public App() { settings = new SettingsClass(); settings.aFoldersPath = new ArrayList(); settings.aFoldersSubfolders = new ArrayList(); settings.aFoldersName = new ArrayList(); settings.aFoldersXml = new ArrayList(); settings.aFoldersFilter = new ArrayList(); settings.aFoldersRequireXml = new ArrayList(); settings.aFoldersRequireExt = new ArrayList(); settings.aFoldersWaitTime = new ArrayList(); settings.aFoldersIgnoreTime = new ArrayList(); settings.aFoldersParameters = new ArrayList(); settings.aFoldersParametersReplace = new ArrayList(); settings.aFoldersParametersFlags = new ArrayList(); queue = new QueueClass(); queue.aQueueFileName = new ArrayList(); queue.aQueueFilePath = new ArrayList(); queue.aQueueTimeStamp = new ArrayList(); queue.aQueueStatus = new ArrayList(); queue.aQueueJobIdx = new ArrayList(); queue.aQueueElapsed = new ArrayList(); cApp = this; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (App game = new App()) { game.Run(); } }
/// <summary> /// /// </summary> /// <param name="args"></param> static void Main(string[] args) { var app = new App(); var window = new MainWindow(); window.Show(); app.Run(window); }
public Window_ECG(App app) { initMembers(app); InitializeComponent(); initWindow(); initTabs(); }
static void Main() { using (App game = new App()) { game.Run(); } }
public static App AddApp(PermissionContext db) { var app = new App { ClientKey = "abc", ClientSecret = "def", Description = "Legacy 2 leg app" }; db.Apps.Add(app); db.SaveChanges(); return db.Apps.First(); }
private void SendMail(App app, AppUpdate update) { ICollection<AppTrack> tracks = repository.AppTrack.RetrieveByApp(app.Id); foreach (AppTrack track in tracks) { User user = repository.User.Retrieve(track.User); if (track.RequireNotification(user, update.Type)) { MailMessage message = CreateMailMessage(user, app, update); if (settings.Debug) { StringBuilder text = new StringBuilder() .AppendLine("Send mail:") .AppendLine("From: " + message.From.Address) .AppendLine("To: " + message.To[0].Address) .AppendLine("Subject: " + message.Subject) .AppendLine(message.Body); logger.Trace(text.ToString()); } else { try { smtp.Send(message); logger.Trace( "Sent mail to user {0}-{1} via {2} for update{3}", user.Id, user.Username, user.Email, update.Id ); } catch (SmtpFailedRecipientException) { logger.Warn("Failed to send email to {0}, address may be invalid", user.Email); } catch (Exception ex) { logger.ErrorException("Encountered unexpected exception when send email", ex); } } } } }
public static void Main(params string[] args) { if (SingleInstance.InitializeAsFirstInstance("Chronos")) { var application = new App(); application.InitializeComponent(); string[] strArgs = null; if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed && AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData != null) { strArgs = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData[0].Split(','); } else { strArgs = args; } if (args != null && args.Length > 0) { application.Run(strArgs); } else { application.Run(); } // Allow single instance code to perform cleanup operations SingleInstance.Cleanup(); } }
public static bool initalize(App app) { GlobalAppData.patchInformation = null; GlobalAppData.app = app; settingsPath = getUserProfilePath(); if (settings == null) { String f = settingsFile; String d = settingsPath; if (!Directory.Exists(settingsPath)) { DirectoryInfo dInfo = Directory.CreateDirectory(settingsPath); if (!dInfo.Exists) { MessageBox.Show("Failed to create profile directory: " + settingsPath); return false; } } loadSettings(); return true; } return true; }
public static void Main() { MemoryManager.AttachApp(); App app = new App(); app.InitializeComponent(); app.Run(); }
public static void Main() { // before actually starting up, check if there is already an instance running if (SingleInstance<App>.InitializeAsFirstInstance(UniqueAppName)) { var application = new App(); application.InitializeComponent(); application.Run(); // Allow single instance code to perform cleanup operations SingleInstance<App>.Cleanup(); // then do the rest if (null == Current) { new Application(); } Current.DispatcherUnhandledException += App_DispatcherUnhandledException; Current.SessionEnding += App_SessionEnding; } //else //{ // var msg = "An instance of PersonalAnalytics was already running. Access it from the task bar on the bottom right of your screen."; // MessageBox.Show("Info", msg); //} }
public static void Main(string[] args) { if (SingleInstance<App>.InitializeAsFirstInstance(Unique)) { string filename; if (args != null && args.Length == 1) { if (System.IO.File.Exists(System.IO.Path.GetFullPath(args[0]))) { filename = System.IO.Path.GetFileName(System.IO.Path.GetFullPath(args[0])); if (filename.EndsWith("osapp", StringComparison.Ordinal)) { // its a plugin package PluginInstallerHelper pInst = new PluginInstallerHelper(); pInst.InstallPlugin(System.IO.Path.GetFullPath(args[0])); } } } else { var application = new App(); application.InitializeComponent(); application.Run(); } // Allow single instance code to perform cleanup operations SingleInstance<App>.Cleanup(); } }
static void Main() { App app = new App(); #if !DEBUG Console.WriteLine("NOT in DEBUG mode"); try { app.Run(new MainWindow()); } catch (Exception e) { ErrorWindow ew = new ErrorWindow(); if (e.StackTrace != null) ew.Message = "In " + e.TargetSite + ": " + e.Message + ";\r\n" + e.StackTrace; else ew.Message = "In EEGArtifactEditor: " + e.Message; ew.ShowDialog(); } #else Console.WriteLine("In DEBUG mode"); app.Run(new MainWindow()); #endif }
public void UStanje(App.Stanje stanje) { buttonDodaj.IsEnabled = stanje.Equals(App.Stanje.Detaljno) || stanje.Equals(App.Stanje.Osnovno); buttonIzmeni.IsEnabled = stanje.Equals(App.Stanje.Detaljno); buttonObrisi.IsEnabled = stanje.Equals(App.Stanje.Detaljno); buttonOsvezi.IsEnabled = stanje.Equals(App.Stanje.Detaljno); }
static void Main() { App app = new App(); Current.Resources.MergedDictionaries.Add(LoadComponent( new Uri("Controls;component/Themes/Styles.xaml", UriKind.Relative)) as ResourceDictionary); app.Run(); }
private void UStanje(App.Stanje stanje) { StanjeTrenutno = stanje; textBoxID.IsEnabled = false; textBoxSifra.IsEnabled = !AutoServis.Properties.Settings.Default.AutomatskiDodeliSifruNacinZahtevaZaPonudu && (stanje.Equals(App.Stanje.Izmena) || stanje.Equals(App.Stanje.Unos)); textBoxNaziv.IsEnabled = stanje.Equals(App.Stanje.Izmena) || stanje.Equals(App.Stanje.Unos); buttonUnesi.IsEnabled = stanje.Equals(App.Stanje.Detaljno) || stanje.Equals(App.Stanje.Osnovno); buttonIzmeni.IsEnabled = stanje.Equals(App.Stanje.Detaljno); buttonPotvrdi.IsEnabled = stanje.Equals(App.Stanje.Unos) || stanje.Equals(App.Stanje.Izmena); buttonOdustani.IsEnabled = stanje.Equals(App.Stanje.Izmena) || stanje.Equals(App.Stanje.Unos); buttonObrisi.IsEnabled = stanje.Equals(App.Stanje.Detaljno); buttonOsvezi.IsEnabled = stanje.Equals(App.Stanje.Detaljno) || stanje.Equals(App.Stanje.Osnovno) || stanje.Equals(App.Stanje.NeuspesnaKonekcija); listBoxLista.IsEnabled = stanje.Equals(App.Stanje.Detaljno) || stanje.Equals(App.Stanje.Osnovno); if (stanje.Equals(App.Stanje.Unos) || stanje.Equals(App.Stanje.Izmena)) { if (!AutoServis.Properties.Settings.Default.AutomatskiDodeliSifruNacinZahtevaZaPonudu) { textBoxSifra.Focus(); } else { textBoxNaziv.Focus(); } } if (stanje.Equals(App.Stanje.Detaljno) || stanje.Equals(App.Stanje.Osnovno)) { buttonUnesi.Focus(); } }
public static void Main(string[] args) { Assembly myAssemblyList = Assembly.GetExecutingAssembly(); string[] myResources = myAssemblyList.GetManifestResourceNames(); foreach (string resource in myResources) { if (resource.EndsWith(".dll")) { string[] temp_name = resource.Split('.'); List<String> temp_lst = new List<string>(); temp_lst = temp_name.ToList(); temp_lst.RemoveAt(0); string filename = ""; foreach (string part in temp_lst) { filename += part + "."; } EmbeddedAssembly.Load(resource, filename); } } AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); var app = new App(); app.InitializeComponent(); app.Run(); }
/// <summary> /// Load App configuration into a App configuration object /// </summary> /// <returns>A App configuration object</returns> public static App Load(string preset = "maestrano") { var config = ConfigurationManager.GetSection(preset + "/app") as App; if (config == null) config = new App(); return config; }
public App(IBluetoothManager bluetoothManager, ILocalStorageManager localStorageManager) { Instance = this; PlatformSpecificManagers.BluetoothManager = bluetoothManager; PlatformSpecificManagers.LocalStorageManager = localStorageManager; MainPage = new Biketimer.Views.Slideout.SlideoutNavigation(); }
public static void Main() { // Set the image file's build action to "Resource" and "Never copy" for this to work. if (!Debugger.IsAttached) { App.SplashScreen = new SplashScreen("Images/TxFlag_256.png"); App.SplashScreen.Show(false, true); } // Set up FieldLog FL.AcceptLogFileBasePath(); FL.RegisterPresentationTracing(); TaskHelper.UnhandledTaskException = ex => FL.Critical(ex, "TaskHelper.UnhandledTaskException", true); // Keep the setup away GlobalMutex.Create("Unclassified.TxEditor"); App.InitializeSettings(); // Make sure the settings are properly saved in the end AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit; // Setup logging //Tx.LogFileName = "tx.log"; //Tx.LogFileName = ""; //Environment.SetEnvironmentVariable("TX_LOG_UNUSED", "1", EnvironmentVariableTarget.User); //Environment.SetEnvironmentVariable("TX_LOG_UNUSED", null, EnvironmentVariableTarget.User); InitializeLocalisation(); App app = new App(); app.InitializeComponent(); app.Run(); }
static void Main() { App app = new App(); // IMPORTANT(Ligh): All windows need to be created before the first one is shown. var welcomeWindow = new WelcomeWindow(); var outputWindow = new OutputWindow(); // Get information about supported games. Settings.SupportedGames = DataFileHandler.ReadGames(); // Show the welcome window. Debug.WriteLine("Showing Welcome Window"); welcomeWindow.ShowDialog(); if (ShouldStop == true) // Exit the application if the welcome window was exited. { Debug.WriteLine("Exiting application as stop signal was given"); outputWindow.Close(); return; } // Run the modules in a separate thread. Thread modulesThread = new Thread(Settings.Game.StartModulesLoop); modulesThread.Start(); // Show the output window. Debug.WriteLine("Showing Output Window"); outputWindow.ShowDialog(); Debug.WriteLine("Program shutting down: reached end of Main()."); }
public void Same_model_to_save_twice_will_update_the_existed_values() { var app = new App(); app.Id = "Same_model_to_save_twice_will_update_the_existed_values"; app.Name = "SameAppToSaveTwice"; app.Price = 111; using (var redis = new RedisService()) { var exited = redis.Get<App>(app.Id); redis.Delete<App>(exited); redis.Add<App>(app); app.Name = "Name1"; redis.Add<App>(app); var getApp = redis.Get<App>(app.Id); Assert.NotEmpty(getApp.Name); redis.Delete<App>(exited); } }
static void Main() { ServiceFactory.StartupService.Run(); var app = new App(); ServiceFactory.ResourceService.AddResource(typeof(UIBehavior).Assembly, "Themes/Styles.xaml"); app.Run(); }
private static void StartUp() { var isFirstInstance = false; for (var i = 1; i <= MAXTRIES; i++) { try { isFirstInstance = SingleInstance<App>.InitializeAsFirstInstance("18980929-1342-4467-bc3d-37b0d13fa938"); break; } catch (RemotingException) { break; } catch (Exception) { if (i == MAXTRIES) { return; } } } if (isFirstInstance) { var application = new App(); application.InitializeComponent(); application.Run(); // Allow single instance code to perform cleanup operations SingleInstance<App>.Cleanup(); } }
public AccountInfo() { this.InitializeComponent(); myApp = (Application.Current) as App; dc = new DataContext(); a = dc.getAccount(myApp._accountId); }
protected static void InitAppRuntime() { ManualConfigSource configSource = new ManualConfigSource { ObjectContainer = typeof(UnityObjectContainer) }; application = AppRuntime.Create(configSource); application.AppInitEvent += application_AppInitEvent; application.Start(); }
public NetworkGUI() { HypeerWeb = App.GetApp("HypeerWeb"); InitializeComponent(); IPAddress addr; string address = TextPrompt.Show("Which address to listen on?", "127.0.0.1"); if (address == null || !IPAddress.TryParse(address, out addr)) { throw new Exception("ARGH"); return; } int iPort; string port = TextPrompt.Show("Which port to listen on?", "30000"); if (port == null || !int.TryParse(port, out iPort) || iPort < 1000 || iPort > (1 << 16)) { throw new Exception("ARGH"); return; } HypeerWeb.Network.Listen(new IPEndPoint(addr, iPort)); lbl_ip.Text = port; }
public MainPage() { this.InitializeComponent(); this.DataContext = viewModel = App.Current; initSocket("http://heartrate.azurewebsites.net"); }
public ChoicePage(App MainThread) { InitializeComponent(); mainApp = MainThread; mainApp.LOG("Info| Choise menu opened."); if (mainApp.b_DevBuilds) info_label.Content = "You have dev builds enabled! You'll be updated to unstable test builds if you continue!"; //TODO: Install button is disabled for the moment. //Repair game is also update game, both do the same, both do their work. if (mainApp.str_local_version != mainApp.str_online_version || mainApp.str_online_devbuild != mainApp.str_local_devbuild) { button_choise1.IsEnabled = true; button_choise2.IsEnabled = false; button_choise3.IsEnabled = false; } else { info_label.Content = "Your game is up to date!"; button_choise3.IsEnabled = true; button_choise1.IsEnabled = false; button_choise2.IsEnabled = false; } }
public App() { Instance = this; Directory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); string stringsFile = Path.Combine(Directory, "Styles", _DefaultStyle); LoadStyleDictionaryFromFile(stringsFile); }
// ReSharper disable once UnusedMember.Local private static void Main() { App.RunEvent <ActionTaken>(5); }
private void btnAddEvent_Click(object sender, EventArgs e) { if (this.cbAddEvent.Text != "--请选择--") { SetTimeList(); SetTitleList(); DateTime dt = CurDateTime.Date.AddHours(this.dtpAddEventTime.Value.Hour).AddMinutes(this.dtpAddEventTime.Value.Minute).AddSeconds(this.dtpAddEventTime.Value.Second); int i = (isHowTime - 2) / 4; //TimeList[i].ToString("yyyy-MM-dd HH:mm:ss") + "点至" + ((i + 1) == 6 ? TimeList[0].AddDays(1).ToString("yyyy-MM-dd HH:mm:ss") : string strMsg = TitleList[i] + "的事件时间范围在" + TimeList[i + 1].ToString("yyyy-MM-dd HH:mm:ss") + "之间"; switch (isHowTime) { case 2: if (dt >= TimeList[i] && dt < TimeList[i + 1]) { } else { App.Msg(strMsg); return; } break; case 6: if (dt >= TimeList[i] && dt < TimeList[i + 1]) { } else { App.Msg(strMsg); return; } break; case 10: if (dt >= TimeList[i] && dt < TimeList[i + 1]) { } else { App.Msg(strMsg); return; } break; case 14: if (dt >= TimeList[i] && dt < TimeList[i + 1]) { } else { App.Msg(strMsg); return; } break; case 18: if (dt >= TimeList[i] && dt < TimeList[i + 1]) { } else { App.Msg(strMsg); return; } break; case 22: if (dt >= TimeList[i]) { } else { App.Msg(strMsg); return; } break; } string even = this.cbAddEvent.Text + "_" + this.dtpAddEventTime.Value.ToString("HH:mm"); this.lbEvents.Items.Add(even); } }
public TabControl() { SizeChanged += (s, e) => { layout(); }; // drop down button dropDownButton.FlatStyle = FlatStyle.Flat; dropDownButton.Width = 24; dropDownButton.Height = 23; dropDownButton.Image = dropDownImage; Controls.Add(dropDownButton); dropDownButton.Click += (s, e) => { var menu = new ContextMenu(); foreach (var t in _tabPages) { if (!t.Item1.Visible) { menu.MenuItems.Add(new MenuItem(t.Item2.Title)); } } menu.Show(dropDownButton, new Point(dropDownButton.Width, dropDownButton.Height), LeftRightAlignment.Left); }; // settings button Controls.Add(settingsButton); settingsButton.Size = new Size(24, 24); settingsButton.Icon = MoreButtonIcon.Settings; settingsButton.Click += (s, e) => { App.ShowSettings(); }; // user button Controls.Add(userButton); userButton.Size = new Size(24, 24); userButton.Location = new Point(24, 0); userButton.Icon = MoreButtonIcon.User; userButton.Click += (s, e) => { ShowUserSwitchPopup(); }; // add tab button Controls.Add(newTabButton); newTabButton.Size = new Size(24, 24); newTabButton.Click += (s, e) => { AddTab(new ColumnTabPage(), true); }; // colors App_ColorSchemeChanged(null, null); App.ColorSchemeChanged += App_ColorSchemeChanged; }
public AppLogic(App app) { _app = app; }
public PluginHostAPI(App app, Router router) { _router = router; _app = app; _ipcRouter = new IPCRouter(); }
public async void DataLoaded() { try { App.GetUserEvent(this, null); if (App.GetUser != String.Empty) { loadingText.Text = "Loading your Profile..."; App.userID = App.GetUser; loading.IsVisible = true; loginForm.IsVisible = false; if (App.AppResume) { loadingText.Text = "Syncing subscriptions..."; await progressBar.ProgressTo(0.2, 250, Easing.Linear); App.serverData.GetLocalToVariable(); App.serverData.mei_user.currentUser = await App.serverData.GetUserWithID(App.userID); //await progressBar.ProgressTo(0.4, 250, Easing.Linear); //loadingText.Text = "Getting your requested Domains..."; //App.serverData.GetRequestedDomains(); //await progressBar.ProgressTo(0.6, 250, Easing.Linear); //loadingText.Text = "Getting your notes..."; //App.serverData.SyncUserNotes(); loadingText.Text = "Syncing registered domains..."; await App.serverData.GetRegisteredDomain(); await progressBar.ProgressTo(0.8, 250, Easing.Linear); loadingText.Text = "Syncing shipping addresses..."; App.serverData.GetUserAddressList(); App.serverData.CreateUserTokenList(); //await progressBar.ProgressTo(0.9, 250, Easing.Linear); loadingText.Text = "Syncing subscriptions..."; await App.serverData.GetUserSubscriptions(); await progressBar.ProgressTo(1, 250, Easing.Linear); Application.Current.MainPage = new HomeLayout(); } else { App.FirstTime = true; loading.IsVisible = false; loginForm.IsVisible = true; } } else { loading.IsVisible = false; loginForm.IsVisible = true; } } catch (Exception e) { await DisplayAlert("User ID", e.ToString(), "OK"); loading.IsVisible = false; loginForm.IsVisible = true; } }
public async void CheckLogin(object sender, EventArgs e) { if (string.IsNullOrEmpty(username.Text)) { await DisplayAlert("Alert", "Email Required", "OK"); return; } if (!BaseFunctions.IsValidEmail(username.Text)) { await DisplayAlert("Alert", "Enter a valid email", "OK"); return; } if (string.IsNullOrEmpty(password.Text)) { await DisplayAlert("Alert", "Password Required", "OK"); return; } loadingText.Text = "Checking with server..."; loading.IsVisible = true; loginForm.IsVisible = false; bool retry = false; do { try { string address = "http://www.myeventit.com/PHP/CheckUserLogin.php/"; var client = App.serverData.GetHttpClient(); var postData = new List <KeyValuePair <string, string> >(); postData.Add(new KeyValuePair <string, string>("email", username.Text.ToLower())); postData.Add(new KeyValuePair <string, string>("password", password.Text)); HttpContent content = new FormUrlEncodedContent(postData); CancellationToken c = new CancellationToken(); HttpResponseMessage result = await client.PostAsync(address, content, c); var isRegistered = await result.Content.ReadAsStringAsync(); if (isRegistered.ToString() != "false" && isRegistered.ToString() != "Inactive") { App.serverData.allDomainEvents = new List <DomainGroup>(); App.serverData.mei_user = new UserProfile(); App.AppHaveInternet = true; App.userID = isRegistered.ToString(); App.SaveUser(this, null); loadingText.Text = "Loading your Profile..."; loading.IsVisible = true; loginForm.IsVisible = false; await progressBar.ProgressTo(0.2, 250, Easing.Linear); loadingText.Text = "Syncing registered Domains..."; var regDomains = await App.serverData.GetRegisteredDomain(); await progressBar.ProgressTo(0.4, 250, Easing.Linear); loadingText.Text = "Syncing requested Domains..."; App.serverData.mei_user.currentUser = await App.serverData.GetUserWithID(App.userID); App.serverData.CreateUserTokenList(); await App.serverData.GetRequestedDomains(); await progressBar.ProgressTo(0.6, 250, Easing.Linear); loadingText.Text = "Syncing notes..."; App.serverData.SyncUserNotes(); await progressBar.ProgressTo(0.8, 250, Easing.Linear); loadingText.Text = "Syncing shipping addresses..."; App.serverData.GetUserAddressList(); await progressBar.ProgressTo(0.9, 250, Easing.Linear); loadingText.Text = "Syncing subscriptions..."; App.serverData.GetUserSubscriptions(); await progressBar.ProgressTo(1, 250, Easing.Linear); App.serverData.AddPhone(CrossDeviceInfo.Current.Id, App.phoneID, App.userID); Application.Current.MainPage = new HomeLayout(); } else { if (isRegistered.ToString() == "false") { App.AppHaveInternet = true; await DisplayAlert("Alert", "User email or Password is Invalid", "OK"); loading.IsVisible = false; loginForm.IsVisible = true; return; } else { App.AppHaveInternet = true; var k = await DisplayAlert("Alert", "Your account is still unverified.", "Resend Confirmation Link", "Ok"); if (k) { var j = await App.serverData.ResendVerficationEmail(username.Text); if (j) { await DisplayAlert("Alert", "Confirmation link will be sent to your email.", "Ok"); } } loading.IsVisible = false; loginForm.IsVisible = true; return; } } } catch (Exception ex) { if (ex.GetType() == typeof(System.Net.WebException)) { retry = await App.Current.MainPage.DisplayAlert("Alert", "No internet connection found. Please check your internet.", "Retry", "Cancel"); } else { retry = true; } if (!retry) { App.AppHaveInternet = false; loading.IsVisible = false; loginForm.IsVisible = true; } } } while (retry); }
private void pmUpdateRecord() { string strErrorMsg = ""; bool bllIsNewRow = false; bool bllIsCommit = false; WS.Data.Agents.cDBMSAgent objSQLHelper = new WS.Data.Agents.cDBMSAgent(App.ConnectionString, App.DatabaseReside); DataRow dtrSaveInfo = this.dtsDataEnv.Tables[this.mstrRefTable].NewRow(); if (this.mFormEditMode == UIHelper.AppFormState.Insert || (objSQLHelper.SetPara(new object[] { this.mstrEditRowID }) && !objSQLHelper.SQLExec(ref this.dtsDataEnv, "QChkRow", this.mstrRefTable, "select cRowID from " + this.mstrRefTable + " where cRowID = ?", ref strErrorMsg))) { bllIsNewRow = true; if (this.mstrEditRowID == string.Empty) { WS.Data.Agents.cConn objConn = WS.Data.Agents.cConn.GetInStance(); this.mstrEditRowID = objConn.RunRowID(this.mstrRefTable); } dtrSaveInfo[MapTable.ShareField.CreateBy] = App.FMAppUserID; dtrSaveInfo[MapTable.ShareField.CreateDate] = objSQLHelper.GetDBServerDateTime(); } // Control Field ที่ทุก Form ต้องมี dtrSaveInfo[MapTable.ShareField.RowID] = this.mstrEditRowID; dtrSaveInfo[MapTable.ShareField.LastUpdateBy] = App.FMAppUserID; dtrSaveInfo[MapTable.ShareField.LastUpdate] = objSQLHelper.GetDBServerDateTime(); // Control Field ที่ทุก Form ต้องมี dtrSaveInfo[QEMPlantInfo.Field.CorpID] = App.ActiveCorp.RowID; dtrSaveInfo[QEMPlantInfo.Field.Code] = this.txtCode.Text.TrimEnd(); dtrSaveInfo[QEMPlantInfo.Field.Name] = this.txtName.Text.TrimEnd(); dtrSaveInfo[QEMPlantInfo.Field.Name2] = this.txtName2.Text.TrimEnd(); dtrSaveInfo["CWORKHOUR"] = this.txtQcStdWorkHr.Tag.ToString(); dtrSaveInfo["CHOLIDAY"] = this.txtQcHoliday.Tag.ToString(); dtrSaveInfo["CWORKCAL"] = ""; dtrSaveInfo["CACTIVE"] = ""; dtrSaveInfo["NCAPACITY"] = 0; dtrSaveInfo["CJOB"] = ""; dtrSaveInfo["CPROJ"] = ""; this.mSaveDBAgent = new WS.Data.Agents.cDBMSAgent(App.ConnectionString, App.DatabaseReside); this.mSaveDBAgent.AppID = App.AppID; this.mdbConn = this.mSaveDBAgent.GetDBConnection(); try { this.mdbConn.Open(); this.mdbTran = this.mdbConn.BeginTransaction(IsolationLevel.ReadUncommitted); string strSQLUpdateStr = ""; object[] pAPara = null; cDBMSAgent.GenUpdateSQLString(dtrSaveInfo, "CROWID", bllIsNewRow, ref strSQLUpdateStr, ref pAPara); this.mSaveDBAgent.BatchSQLExec(strSQLUpdateStr, pAPara, ref strErrorMsg, this.mdbConn, this.mdbTran); this.mdbTran.Commit(); bllIsCommit = true; if (this.mFormEditMode == UIHelper.AppFormState.Insert) { KeepLogAgent.KeepLog(objSQLHelper, KeepLogType.Insert, TASKNAME, this.txtCode.Text, this.txtName.Text, App.FMAppUserID, App.AppUserName); } else if (this.mFormEditMode == UIHelper.AppFormState.Edit) { if (this.mstrOldCode == this.txtCode.Text && this.mstrOldName == this.txtName.Text) { KeepLogAgent.KeepLog(objSQLHelper, KeepLogType.Update, TASKNAME, this.txtCode.Text, this.txtName.Text, App.FMAppUserID, App.AppUserName); } else { KeepLogAgent.KeepLogChgValue(objSQLHelper, KeepLogType.Update, TASKNAME, this.txtCode.Text, this.txtName.Text, App.FMAppUserID, App.AppUserName, this.mstrOldCode, this.mstrOldName); } } } catch (Exception ex) { if (!bllIsCommit) { this.mdbTran.Rollback(); } App.WriteEventsLog(ex); #if xd_RUNMODE_DEBUG MessageBox.Show("Message : " + ex.Message + "\n" + ex.Source + "\n" + ex.StackTrace); #endif } finally { this.mdbConn.Close(); } }
public void Register() { App.Singleton <ITaskManager, TaskManager>(); }
public static int Main(string[] args) { App server = new App(); return(server.main(args)); }
private void Awake() { Instance = this; ObjectPoolRoot = transform.Find("ObjectPoolRoot"); }
public static void Update(App app, bool overwrite) { Remove(app, overwrite); AppInstall.Install(app, overwrite); }
protected void OnButtonLeft_Click(object sender, EventArgs e) { App app = DataHelper.GetApp(); StudentRepository rep = new StudentRepository(app); }
public MainWindow() { InitializeComponent(); DataContext = new MainViewModel(App.GetBusinessLogicPresenter().MessageControl); }
public PageMenu() { this.InitializeComponent(); txtFooter.Text = App.GetAppTextFooter(); //NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Required; }
public ActivationService(App app, Type defaultNavItem, Lazy <UIElement> shell = null) { _app = app; _shell = shell; _defaultNavItem = defaultNavItem; }
private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { App.CloseApp(); }
private void Shell_Navigating(object sender, ShellNavigatingEventArgs e) { App.DebugLog(string.Format("OnNavigating Source: {0} Target: {1} Current:{2}", e.Source.ToString(), e.Target?.Location.ToString(), e.Current.Location)); NavigationTargetLocation = e.Target?.Location; }
// TODO // Implement control specific ui tests protected override void FixtureTeardown() { App.NavigateBack(); base.FixtureTeardown(); }
private async void RateButtonClickHandler(object sender, RoutedEventArgs e) { await App.RateAppAsync(); }
public static void QuitOnPress(object rArgs) { App.StopRunning(false); }
public override Task WaitForPageToLoad(TimeSpan?timespan = null) { App.WaitForElement(_gitTrendsImage); return(Task.CompletedTask); }
public LogInPage SignIn() { App.Tap(signInButton); return(this); }
protected override void NavigateToGallery() { App.NavigateToGallery(GalleryQueries.RadioButtonGallery); }
//Fill:填充 private void OtherFillButton_Tapped(object sender, TappedRoutedEventArgs e) { App.InitializeOther(); ToOther(307); }
public void CheckThereIsNoNavigation() { App.WaitForElement(emailField); App.WaitForElement(passwordField); App.WaitForElement(signInButton); }
//Fade:渐隐 private void OtherFadeButton_Tapped(object sender, TappedRoutedEventArgs e) { App.InitializeEffect(); ToOther(304); }
//Transform3D:变换3D private void OtherTransform3DButton_Tapped(object sender, TappedRoutedEventArgs e) { App.InitializeEffect(); ToOther(309); }
//Crop:裁切 private void OtherCropButton_Tapped(object sender, TappedRoutedEventArgs e) { App.InitializeCrop(); ToOther(300, true); }
//Grids:网格线 private void GridsButton_Tapped(object sender, TappedRoutedEventArgs e) { App.InitializeOther(); ToOther(306, true); }