示例#1
0
        private void settingBTN_Click(object sender, RoutedEventArgs e)
        {
            SettingWindow settingWindow = new SettingWindow(Setting);

            settingWindow.ShowDialog();
            SetDispatcherTimerTNotifications();
        }
示例#2
0
        /// <summary>
        /// Called when [setting handler].
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void OnSettingHandler(object sender, RoutedEventArgs e)
        {
            try
            {
                SettingWindow win = null;
                try
                {
                    win       = new SettingWindow();
                    win.Owner = this;
                    win.ShowDialog();
                }
                finally
                {
                    win.Close();
                }
            }
            #region Exception Handling

            catch (Exception ex)
            {
                TraceSourceMonitorHelper.Error("UI event handler failed: {0}", ex);
            }

            #endregion // Exception Handling
        }
示例#3
0
        private void addAuthButton_Click(object sender, RoutedEventArgs e)
        {
            var a = new SettingWindow();

            a.ShowAddAuthModule();
            a.ShowDialog();
            Refresh();
        }
示例#4
0
        private void Options()
        {
            SettingWindow settings = new SettingWindow();

            if (settings.ShowDialog() == DialogResult.OK)
            {
                Helper.SaveShortcuts();
            }
        }
示例#5
0
 private void SettingMenu_Click(object sender, RoutedEventArgs e)
 {
     if (_settingWindow == null)
     {
         _settingWindow = new SettingWindow();
         _settingWindow.ShowDialog();
         _settingWindow = null;
     }
 }
示例#6
0
        private void ButtonSetting_Click(object sender, RoutedEventArgs e)
        {
            var setting = new SettingWindow()
            {
                Owner = this, ShowInTaskbar = false, WindowStartupLocation = WindowStartupLocation.CenterOwner
            };

            setting.ShowDialog();
        }
示例#7
0
        private void GotoSetting(object sender, RoutedEventArgs e)
        {
            Test();
            SettingWindow win = new SettingWindow();

            win.Owner = this;
            win.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            win.ShowDialog();
        }
示例#8
0
        private void Button_Setting_Click(object sender, RoutedEventArgs e)
        {
            var win = new SettingWindow()
            {
                Owner = Application.Current.MainWindow
            };

            win.ShowDialog();
        }
 private void InitializeSettingCommand()
 {
     SettingCommand = new RelayCommand <object>(
         sender => { return(true); }, sender =>
     {
         SettingWindow settingWindow = new SettingWindow();
         IsCheck = false;
         settingWindow.ShowDialog();
     });
 }
示例#10
0
        public override void In(FlowScriptEngine.FlowEventArgs e)
        {
            SetValue(nameof(Setting));
            var window = new SettingWindow();

            Setting.Initialize();
            window.DataContext = Setting;
            Result             = window.ShowDialog() == true ? DialogResult.OK : DialogResult.Cancel;
            OnSuccess();
        }
示例#11
0
        internal static void OpenSettingDialog(Window ownerWindow)
        {
            var settingWindow = new SettingWindow()
            {
                Owner = ownerWindow
            };

            settingWindow.ShowDialog();
            settingWindow.Dispose();
        }
示例#12
0
        private void btnSetting_Click(object sender, RoutedEventArgs e)
        {
            SettingWindow setting = new SettingWindow(_subsystem)
            {
                Owner = Application.Current.MainWindow
            };

            Log.Debug("btnSetting_Click__setting.ShowDialog BEFORE");
            setting.ShowDialog();
            Log.Debug("btnSetting_Click__setting.ShowDialog AFTER");
        }
示例#13
0
        //private void CaptureJpeg()
        //{
        //    string sJpegPicFileName;
        //    //ͼƬ±£´æ·¾¶ºÍÎļþÃû the path and file name to save
        //    sJpegPicFileName = "JPEG_test.jpg";

        //    int lChannel = Int16.Parse(dvrControl.dvrObject.Channel); //ͨµÀºÅ Channel number

        //    CHCNetSDK.NET_DVR_JPEGPARA lpJpegPara = new CHCNetSDK.NET_DVR_JPEGPARA();
        //    lpJpegPara.wPicQuality = 0; //ͼÏñÖÊÁ¿ Image quality
        //    lpJpegPara.wPicSize = 0xff; //ץͼ·Ö±æÂÊ Picture size: 2- 4CIF£¬0xff- Auto(ʹÓõ±Ç°ÂëÁ÷·Ö±æÂÊ)£¬×¥Í¼·Ö±æÂÊÐèÒªÉ豸֧³Ö£¬¸ü¶àÈ¡ÖµÇë²Î¿¼SDKÎĵµ

        //    //JPEGץͼ Capture a JPEG picture
        //    if (!CHCNetSDK.NET_DVR_CaptureJPEGPicture(m_lUserID, lChannel, ref lpJpegPara, sJpegPicFileName))
        //    {
        //        //fail capture
        //        iLastErr = CHCNetSDK.NET_DVR_GetLastError();
        //        str = "NET_DVR_CaptureJPEGPicture failed, error code= " + iLastErr;
        //        //MessageBox.Show(str);
        //        return;
        //    }
        //    else
        //    {
        //        //success capture
        //        str = "Successful to capture the JPEG file and the saved file is " + sJpegPicFileName;
        //        //MessageBox.Show(str);
        //    }
        //    return;
        //}

        #endregion

        private void OpenSetting(object sender, MouseButtonEventArgs e)
        {
            SigninWindow signinWindow = new SigninWindow();

            signinWindow.ShowDialog();

            if (signinWindow.Loginstatus)
            {
                SettingWindow settingWindow = new SettingWindow();
                settingWindow.ShowDialog();
            }
        }
示例#14
0
        /// <summary>
        /// ウィンドウが開かれた
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var window = new SettingWindow();

            window.Owner = this;
            window.ShowDialog();
            string apiKey = window.APIKey;

            YoutubeChatClient = new YoutubeChatClient();
            YoutubeChatClient.OnCommentReceiveEach += YoutubeChatClient_OnCommentReceiveEach;
            YoutubeChatClient.OnCommentReceiveDone += YoutubeChatClient_OnCommentReceiveDone;
            YoutubeChatClient.APIKey = apiKey;
        }
示例#15
0
        private void Properties_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            // 設定画面を開く
            var win = new SettingWindow();

            win.Owner = this;
            var result = win.ShowDialog();

            if (result == true)
            {
                this.ViewModel.CurrentMode = this.ViewModel.CurrentMode;
            }
        }
示例#16
0
        private static void CreateSettingWindow()
        {
            if (_displaySubWindowList.Any(w => w.SubWindowName == Define.SubWindowName.SettingWindow))
            {
                // 既に開かれているなら何もせず戻る
                return;
            }

            SettingWindow settingWindow = new SettingWindow();

            _displaySubWindowList.Add(new SubWindowData(settingWindow, Define.SubWindowName.SettingWindow));

            settingWindow.ShowDialog();
        }
示例#17
0
        private void Setting_Click(object sender, RoutedEventArgs e)
        {
            SettingWindow setting = new SettingWindow();

            setting.ShowDialog();

            // If user enteres ip and port to change and pressed ok.
            if (setting.IsOk)
            {
                mainVM.Ip         = setting.ipText.Text;
                mainVM.Port       = int.Parse(setting.portText.Text);
                ipLabel.Content   = mainVM.Ip;
                portLabel.Content = mainVM.Port;
                setting.IsOk      = false;
            }
        }
示例#18
0
        private async Task Set()
        {
            Log.Instance.Logger.Info("settings");

            SettingWindow setWin = new SettingWindow();

            setWin.Owner = MainWindow.Instance;
            SettingsViewModel setVM = (setWin.DataContext) as SettingsViewModel;

            setVM.SelectedPortName = this.PortName;

            if (setWin.ShowDialog() ?? false)
            {
                this.PortName = setVM.SelectedPortName;
                this.RaisePropertyChanged(nameof(IsOpened));
            }
        }
示例#19
0
    /// <summary>
    /// 設定ウィンドウを開く
    /// </summary>
    public static void OpenSettingWindow(Window owner = null)
    {
        var opennedWindow = GetWindows <SettingWindow>().FirstOrDefault();

        if (opennedWindow is not null)
        {
            _ = opennedWindow.Activate();
        }
        else
        {
            opennedWindow = new SettingWindow
            {
                Owner = owner,
            };

            opennedWindow.ShowDialog();
        }
    }
示例#20
0
 private void ButtonExecuteMethod(object obj)
 {
     if (obj.ToString() == "play")
     {
         SelectUserWindow selectWindow = new SelectUserWindow();
         selectWindow.ShowDialog();
     }
     else if (obj.ToString() == "setting")
     {
         SettingWindow settingWindow = new SettingWindow();
         settingWindow.ShowDialog();
     }
     else if (obj.ToString() == "admin")
     {
         AdminWindow adminWindow = new AdminWindow();
         adminWindow.ShowDialog();
     }
 }
示例#21
0
        private void ExcuteOpenSettingWindow(object param)
        {
            if (param == null)
            {
                return;
            }

            var view = new SettingWindow()
            {
                DataContext = new SettingWindowViewModel()
            };

            view.Owner = param as Window;
            view.WindowStartupLocation = WindowStartupLocation.CenterOwner;

            view.ShowDialog();

            ButtonVisibility = SettingManager.GetInstance().GetButtonVisibility();
        }
示例#22
0
        /// <summary>
        /// 設定ウィンドウを開きます
        /// </summary>
        private void ConfigButton_Click(object sender, RoutedEventArgs e)
        {
            var settingWindow = new SettingWindow
            {
                Owner = Window.GetWindow(this),
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
            };
            var ret = settingWindow.ShowDialog();

            if (ret.HasValue && ret.Value)
            {
                return;
            }

            var chromosomesType = (ChromosomesType)CachingConfig.SettingCaching.ChromosomesTypeIndex;
            var selectionType   = (SelectionType)CachingConfig.SettingCaching.SelectionTypeIndex;
            var crossOverType   = (CrossOverType)CachingConfig.SettingCaching.CrossOverTypeIndex;
            var mutationType    = (MutationType)CachingConfig.SettingCaching.MutationTypeIndex;
            var mutationRate    = CachingConfig.SettingCaching.MutationRate;
            var populationSize  = CachingConfig.SettingCaching.PopulationSize;

            // ソルバーの生成
            _gaSolver = new GASolver(new GASolver.GASolverInfo(
                                         chromosomesType,
                                         selectionType,
                                         crossOverType,
                                         mutationType,
                                         mutationRate,
                                         populationSize,
                                         _cityList.Count,
                                         CalculatePathCost));
            _gaSolver.Initialize();

            _maxGeneration = CachingConfig.SettingCaching.MaxGeneration;
            _logDisplayNum = CachingConfig.SettingCaching.LogDisplayNum;

            DisplaySettingInfo(chromosomesType, selectionType, crossOverType, mutationType, mutationRate, populationSize, _maxGeneration);

            UpdatePhase(ExecutePhase.ExecuteReady);
        }
        public void OpenSettingWindow(Window w)
        {
            SettingWindow window = new SettingWindow();

            window.ShowDialog();
        }
        /// <summary>
        /// 設定ウインドウを表示します。
        /// </summary>
        /// <param name="sender">イベントのソース</param>
        /// <param name="e">イベントのデータ</param>
        void Show_OptionWindow(object sender, RoutedEventArgs e)
        {
            SettingWindow settingWindow = new SettingWindow(filePathComboBox);

            settingWindow.ShowDialog();
        }
示例#25
0
        private void btnSystemSetting_Click(object sender, RoutedEventArgs e)
        {
            SettingWindow win = new SettingWindow();

            win.ShowDialog();
        }
示例#26
0
        private void OnSetting()
        {
            var window = new SettingWindow();

            window.ShowDialog();
        }
示例#27
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (settingsWindowShowFlag == true)
            {
                MessageBox.Show("�T�[�r�X�̍X�V���ł��B���΂炭���҂���������");
                return;
            }

            try
            {
                using (SettingWindow settingWindow = new SettingWindow())
                {
                    settingWindow.Owner = System.Windows.Application.Current.Windows[0];
                    settingWindow.ShowDialog();
                    if (settingWindow.DialogResult != true) return;
                    if (settingWindow.DataFormatCheck() != "") return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("��肪�����������߃E�C���h�E��\���ł��܂���ł���\r\n" + ex.Message);
                return;
            }

            QueryGrid.Children.Clear();

            if (Settings.Default.TreeRadioButton == true)
                QueryGrid.Children.Add(new FileShareTreeQueryControl_2());

            if (Settings.Default.TabRadioButton == true)
                QueryGrid.Children.Add(new FileShareTabQueryControl());

            Thread stopThread = new Thread(new ThreadStart(delegate()
            {
                settingsWindowShowFlag = true;

                StopService();
            }));
            stopThread.Start();

            Thread startThread = new Thread(new ThreadStart(delegate()
            {
                stopThread.Join();
                StartService();

                settingsWindowShowFlag = false;
            }));
            startThread.Start();
        }
示例#28
0
        public void ShowSettingWindow(object obj)
        {
            var settingsWindow = new SettingWindow(this.settingWindowVM);

            settingsWindow.ShowDialog();
        }
示例#29
0
        private void SettingButton_OnClick(object sender, RoutedEventArgs e)
        {
            var settingWindow = new SettingWindow();

            settingWindow.ShowDialog();
        }
示例#30
0
        public void ShowSettingWindow()
        {
            var window = new SettingWindow();

            window.ShowDialog();
        }
示例#31
0
        protected override void OnExecute(object parameter)
        {
            SettingWindow settingWindow = new SettingWindow();

            settingWindow.ShowDialog();
        }