private void btnCom_Click(object sender, EventArgs e)
        {
            SettingForm  setcom = new SettingForm("Toner", "GICJ", 1);
            DialogResult dg     = setcom.ShowDialog();

            if (dg == DialogResult.OK)
            {
                PaCSGlobal.InitComPort("Toner", "GICJ", ports);

                if (ports[0].IsOpen)
                {
                    ports[0].DataReceived += new SerialDataReceivedEventHandler(serialPortGICJ_DataReceived);//重新绑定
                }
            }
        }
Exemplo n.º 2
0
 private void SettingButton_Click(object sender, EventArgs e)
 {
     try
     {
         using (SettingForm settingForm = new SettingForm(Master, devno, TargetSensor))
         {
             settingForm.ShowInTaskbar = false;
             settingForm.StartPosition = FormStartPosition.CenterParent;
             settingForm.ShowDialog(this);
         }
     }
     catch
     {
     }
 }
Exemplo n.º 3
0
        private void btnSetting_Click(object sender, EventArgs e)
        {
            try
            {
                SettingForm  setcom = new SettingForm("MetalMask", "", 1);
                DialogResult dg     = setcom.ShowDialog();

                if (dg == DialogResult.OK)
                {
                    PaCSGlobal.InitComPort("MetalMask", "", ports);
                }
            }
            catch (Exception btnNew_Click)
            {
                XtraMessageBox.Show(this, "System error[btnNew_Click]: " + btnNew_Click.Message);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// call setting form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void setting_Click(object sender, EventArgs e)
        {
            //check if Keyboardd is on
            if (isRunning == true)
            {
                //if true set to false to not check key
                isRunning = false;
                //set button text
                buttonPauseOrStart.Text = "Start";

                TH.Abort();
            }
            //maek new from
            SettingForm settingForm = new SettingForm(this.userData, this.musicPalyClass, this.setNewFileOrWeb);

            //show new from
            settingForm.ShowDialog();

            //save new setting
            this.saveAndLoad.save(this.userData);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Open edit setting form and set default config files values
        /// </summary>
        /// <param name="configFiles">Config files to edit</param>
        public static void EditSetting(ConfigFilesCollection configFiles)
        {
            var sf = new SettingForm(false);

            var temp = Program.AppSet;

            sf.propertyGrid1.SelectedObject = temp;

            sf.ShowDialog();

            if (sf.DialogResult == DialogResult.OK)
            {
                Program.AppSet = temp;
                InitNewConfigMenu();

                foreach (XmlFile.ConfigFilesTypes ft in Enum.GetValues(typeof(XmlFile.ConfigFilesTypes)))
                {
                    configFiles.ConfigFiles[(int)ft] = new XmlFile("sources/" + ft + ".config", ft); //get generic .config
                }
            }
        }
Exemplo n.º 6
0
        private void OnMenuItemConfigClick(object sender, EventArgs e)
        {
            var dialog = new SettingForm();

            dialog.ShowDialog(this);
        }
Exemplo n.º 7
0
        private void btnSetting_Click(object sender, EventArgs e)
        {
            SettingForm form = new SettingForm();

            form.ShowDialog();
        }
Exemplo n.º 8
0
        void tsmSettings_Click(object sender, EventArgs e)
        {
            var frm = new SettingForm();

            frm.ShowDialog();
        }
Exemplo n.º 9
0
    /// <summary>
    /// 设置按钮
    /// </summary>
    private void settingButton_Click(object sender, EventArgs e)
    {
        SettingForm winform = new SettingForm();

        winform.ShowDialog();
    }
Exemplo n.º 10
0
        private void Setting_Click(object sender, RoutedEventArgs e)
        {
            SettingForm form = new SettingForm(this);

            form.ShowDialog();
        }
Exemplo n.º 11
0
        private void btnSet_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var settingForm = new SettingForm();

            settingForm.ShowDialog(this);
        }
Exemplo n.º 12
0
        private void btnSetting_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var ShowForm = new SettingForm();

            ShowForm.ShowDialog();
        }
Exemplo n.º 13
0
        private void tsmiSettings_Click(object sender, EventArgs e)
        {
            SettingForm settingForm = new SettingForm();

            settingForm.ShowDialog();
        }
Exemplo n.º 14
0
 public MainForm()
 {
     InitializeComponent();
     if (Properties.Settings.Default.SaveDirectory == "")
     {
         Properties.Settings.Default.SaveDirectory = DefaultSaveDirectory;
     }
     SetUIStatusText(Status.Idle);
     SetButtonStatus(Status.Idle);
     btnBrowse.Click += (s, e) =>
     {
         // NOTE: 録音ファイル保存先のディレクトリを開く
         try
         {
             System.Diagnostics.Process.Start("EXPLORER.EXE", CurrentSaveDirectory);
         }
         catch (Exception)
         {
             MessageBox.Show(
                 "録音ファイルの保存先ディレクトリを開けませんでした。",
                 "エラー",
                 MessageBoxButtons.OK,
                 MessageBoxIcon.Error);
         }
     };
     btnRecord.Click += (s, e) =>
     {
         if (recorder.IsRecording)
         {
             // Note: Stop recording
             if (!recorder.StopRecording())
             {
                 MessageBox.Show(
                     "録音の停止に失敗しました。",
                     "エラー",
                     MessageBoxButtons.OK,
                     MessageBoxIcon.Error);
                 return;
             }
             timerLabel1.Stop();
             SetUIStatusText(Status.Idle);
             SetButtonStatus(Status.Idle);
         }
         else
         {
             // Note: Start recording
             if (!MakeDirectory(CurrentSaveDirectory))
             {
                 MessageBox.Show(
                     "保存先ディレクトリの作成に失敗したため、録音を開始できませんでした。",
                     "エラー",
                     MessageBoxButtons.OK,
                     MessageBoxIcon.Error);
                 return;
             }
             if (!recorder.StartRecording(SaveFilePath))
             {
                 MessageBox.Show(
                     "録音の開始に失敗しました。",
                     "エラー",
                     MessageBoxButtons.OK,
                     MessageBoxIcon.Error);
                 return;
             }
             timerLabel1.Start();
             SetUIStatusText(Status.Recording);
             SetButtonStatus(Status.Recording);
         }
     };
     btnSetting.Click += (s, e) =>
     {
         // NOTE: 設定画面を開く
         using (var sf = new SettingForm())
         {
             sf.ShowDialog();
         }
     };
     FormClosing += (s, e) =>
     {
         // NOTE: 録音などの処理中に閉じられないようにする
         if (recorder.IsRecording)
         {
             MessageBox.Show(
                 "アプリケーションを終了する前に録音を停止してください。",
                 "警告",
                 MessageBoxButtons.OK,
                 MessageBoxIcon.Warning);
             e.Cancel = true;
             return;
         }
         Properties.Settings.Default.Save();
     };
 }
Exemplo n.º 15
0
        /// <summary>
        /// Ctrl+CV의 달인 정보 버튼
        /// </summary>
        private void btnAbout_Click(object sender, EventArgs e)
        {
            SettingForm settingForm = new SettingForm(this);

            settingForm.ShowDialog();
        }
Exemplo n.º 16
0
        private void SettingButton_ItemClick(object sender, ItemClickEventArgs e)
        {
            SettingForm settingForm = new SettingForm();

            settingForm.ShowDialog();
        }
Exemplo n.º 17
0
        private void настройкаToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var settingsForm = new SettingForm();

            settingsForm.ShowDialog();
        }
Exemplo n.º 18
0
        private void tsmiFormat_Click(object sender, EventArgs e)
        {
            var form = new SettingForm();

            form.ShowDialog();
        }
Exemplo n.º 19
0
        private void settingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var settings = new SettingForm();

            settings.ShowDialog();
        }
Exemplo n.º 20
0
 private void mnuServerSetting_Click(object sender, EventArgs e)
 {
     controls.SettingForm form = new SettingForm();
     form.ShowDialog();
 }
Exemplo n.º 21
0
        private void SettingsBtn_Click(object sender, EventArgs e)
        {
            var settingForm = new SettingForm(Program.Setting);

            settingForm.ShowDialog();
        }