private void createBtn_Click(object sender, RoutedEventArgs e) { if (tabEffectSel.SelectedIndex < 0) { tabEffectSel.SelectedIndex = 0; } string andAt = "/effect " + at + " "; if (tabEffectSel.SelectedIndex == 1) { andAt += "clear"; } else if (tabEffectSel.SelectedIndex == 0) { this.ShowMessageAsync(FloatErrorTitle, EffectChooseEffect, MessageDialogStyle.Affirmative, new MetroDialogSettings() { AffirmativeButtonText = FloatConfirm, NegativeButtonText = FloatCancel }); } else { AllSelData asd = new AllSelData(); if (tabEffectSelID.IsChecked.Value == true) { if (tabEffectHide.IsChecked.Value == true) { andAt += asd.getEffect(tabEffectSel.SelectedIndex, true) + " " + tabEffectTime.Value + " " + tabEffectLevel.Value + " true"; } else { andAt += asd.getEffect(tabEffectSel.SelectedIndex, true) + " " + tabEffectTime.Value + " " + tabEffectLevel.Value; } } else if (tabEffectSelName.IsChecked.Value == true) { if (tabEffectHide.IsChecked.Value == true) { andAt += asd.getEffect(tabEffectSel.SelectedIndex, false) + " " + tabEffectTime.Value + " " + tabEffectLevel.Value + " true"; } else { andAt += asd.getEffect(tabEffectSel.SelectedIndex, false) + " " + tabEffectTime.Value + " " + tabEffectLevel.Value; } } else { this.ShowMessageAsync(FloatErrorTitle, EffectNotChooseError, MessageDialogStyle.Affirmative, new MetroDialogSettings() { AffirmativeButtonText = FloatConfirm, NegativeButtonText = FloatCancel }); } } tabEffectBitmapDraw(); finalStr = andAt; }