private void btn_addRec_Click(object sender, RoutedEventArgs e) { winCustom wincustom = new winCustom(); AddRec_UC addRec_uc = new AddRec_UC(); addRec_uc.CloseDialog += new ucCustom.CloseDialogHandler(UserControl_CloseDialog); wincustom.winContent = addRec_uc; wincustom.Title = "Schedule a recording"; wincustom.Topmost = true; wincustom.Owner = this; wincustom.WindowStartupLocation = WindowStartupLocation.CenterOwner; wincustom.ShowInTaskbar = false; if (wincustom.ShowDialog() == true) { if (dgRecObj.Items.Count > 0) { if (chechbox_isshutdown.Visibility != Visibility.Visible) { chechbox_isshutdown.Visibility = Visibility.Visible; chechbox_isshutdown.IsChecked = false; StartRefreshDataGrid(); } } } }
private bool CheckAuthentication() { winCustom wincustom = new winCustom(); Authentication_UC authentication_uc = new Authentication_UC(); wincustom.winContent = authentication_uc; wincustom.Title = "Authentication"; wincustom.Topmost = true; wincustom.Owner = this; wincustom.WindowStartupLocation = WindowStartupLocation.CenterOwner; wincustom.ShowInTaskbar = false; return(wincustom.ShowDialog() == true); }
private void btn_openlog_s_Click(object sender, RoutedEventArgs e) { RecObj obj = ((FrameworkElement)sender).DataContext as RecObj; winCustom wincustom = new winCustom(); Log_UC log_uc = new Log_UC(); log_uc.Log = obj.GetLog(); log_uc.CloseDialog += new ucCustom.CloseDialogHandler(UserControl_CloseDialog); wincustom.winContent = log_uc; wincustom.Title = "Log"; wincustom.Topmost = true; wincustom.ShowInTaskbar = false; wincustom.ShowDialog(); }
private void Information_PreviewMouseDown(object sender, MouseButtonEventArgs e) { winCustom wincustom = new winCustom(); Info_UC info_uc = new Info_UC(); wincustom.winContent = info_uc; wincustom.Title = "Information"; wincustom.Topmost = true; wincustom.Owner = this; wincustom.WindowStartupLocation = WindowStartupLocation.CenterOwner; wincustom.ShowInTaskbar = false; wincustom.ShowDialog(); RefreshDebugMode(); }
private void btn_openlog_m_Click(object sender, RoutedEventArgs e) { winCustom wincustom = new winCustom(); Log_UC log_uc = new Log_UC(); log_uc.Log = (rec_manual == null) ? "" : rec_manual.GetLog(); log_uc.CloseDialog += new ucCustom.CloseDialogHandler(UserControl_CloseDialog); wincustom.winContent = log_uc; wincustom.Title = "Log"; wincustom.Topmost = true; wincustom.Owner = this; wincustom.WindowStartupLocation = WindowStartupLocation.CenterOwner; wincustom.ShowInTaskbar = false; wincustom.ShowDialog(); }
public static bool PrepareShutDown(Window window) { winCustom wincustom = new winCustom(); ShutDownDialog_UC shutdownDialog_uc = new ShutDownDialog_UC(); OperationHandler shutdown = new OperationHandler(ShutDown); shutdownDialog_uc.window = window; shutdownDialog_uc.Operation_delegate = shutdown; wincustom.winContent = shutdownDialog_uc; wincustom.Title = "Warning"; wincustom.CloseButtonVisible = false; wincustom.WindowStartupLocation = WindowStartupLocation.CenterScreen; wincustom.Topmost = true; wincustom.ShowInTaskbar = false; return(wincustom.ShowDialog() == true); }
public static bool RunWithProcessingUC(OperationHandlerWithResult operation, string message) { winCustom wincustom = new winCustom(); Processing_UC processing_uc = new Processing_UC(); processing_uc.window = wincustom; processing_uc.Operation_delegate_with_result = operation; processing_uc.Message = message; processing_uc.ShowProgressBar = true; wincustom.winContent = processing_uc; wincustom.Topmost = true; wincustom.Owner = _window; wincustom.WindowStartupLocation = WindowStartupLocation.CenterOwner; wincustom.WindowStyle = WindowStyle.None; wincustom.AllowsTransparency = true; wincustom.ShowInTaskbar = false; return(wincustom.ShowDialog() == true); }
private void Setting_PreviewMouseDown(object sender, MouseButtonEventArgs e) { winCustom wincustom = new winCustom(); Setting_UC setting_uc = new Setting_UC(); wincustom.winContent = setting_uc; wincustom.Title = "Setting"; wincustom.Topmost = true; wincustom.Owner = this; wincustom.WindowStartupLocation = WindowStartupLocation.CenterOwner; wincustom.ShowInTaskbar = false; if (wincustom.ShowDialog() == true) { RefreshSetting(); IniHelper.WriteValue(Parameter._iniSectionSetting, Parameter._iniKeyTimeZoneId, GlobalVar._timezoneId, Parameter._setting_Path); } }