private void preferencesToolStripMenuItem_Click(object sender, EventArgs e) { Preferences pref = new Preferences(); if (pref.ShowDialog() == DialogResult.OK) { messages_level = FlickrSync.StringToMsgLevel(Properties.Settings.Default.MessageLevel); log_level = FlickrSync.StringToLogLevel(Properties.Settings.Default.LogLevel); if (autorun) { messages_level = MessagesLevel.MessagesNone; } } }
private void FlickrSync_Load(object sender, EventArgs e) { string token = ""; try { token = Properties.Settings.Default.FlickrToken; } catch (Exception) { } if (token == "") { FlickrGetToken(); } messages_level = FlickrSync.StringToMsgLevel(Properties.Settings.Default.MessageLevel); log_level = FlickrSync.StringToLogLevel(Properties.Settings.Default.LogLevel); if (autorun) { messages_level = MessagesLevel.MessagesNone; } // ri is needed to get the user. TODO: Get User without using ri ri = new RemoteInfo(); UpdateUser(); LoadConfig(); Reload(); FlickrSync.Log(LogLevel.LogBasic, "Application loaded"); if (autorun) { WindowState = FormWindowState.Minimized; } else { WindowState = FormWindowState.Maximized; } if (autorun) { ViewAndSync(); Close(); } }
private void preferencesToolStripMenuItem_Click(object sender, EventArgs e) { Preferences pref = new Preferences(); if (pref.ShowDialog() == DialogResult.OK) { messages_level = FlickrSync.StringToMsgLevel(Properties.Settings.Default.MessageLevel); log_level = FlickrSync.StringToLogLevel(Properties.Settings.Default.LogLevel); if (autorun) messages_level = MessagesLevel.MessagesNone; } }
private void FlickrSync_Load(object sender, EventArgs e) { string token=""; try { token=Properties.Settings.Default.FlickrToken; token=token.Trim(); } catch(Exception) { } if (token.Length == 0){ FlickrGetToken(); } messages_level = FlickrSync.StringToMsgLevel(Properties.Settings.Default.MessageLevel); log_level = FlickrSync.StringToLogLevel(Properties.Settings.Default.LogLevel); if (autorun) messages_level = MessagesLevel.MessagesNone; // ri is needed to get the user. TODO: Get User without using ri ri = new RemoteInfo(); UpdateUser(); LoadConfig(); Reload(); FlickrSync.Log(LogLevel.LogBasic, "Application loaded"); if (autorun) WindowState = FormWindowState.Minimized; else WindowState = FormWindowState.Maximized; if (autorun) { ViewAndSync(); Close(); } }
private void FlickrSync_Load(object sender, EventArgs e) { // probably not needed but just to make sure no message from previous versions is shown if (Properties.Settings.Default.MessageId.CompareTo("090130_0000") < 0) { Properties.Settings.Default.MessageId = "090130_0000"; Properties.Settings.Default.Save(); } HashUsers = new ArrayList(); OAuthAccessToken token = null; try { token = Properties.Settings.Default.OAuthToken; } catch (Exception) { } if (token == null) { FlickrGetToken(); } messages_level = FlickrSync.StringToMsgLevel(Properties.Settings.Default.MessageLevel); log_level = FlickrSync.StringToLogLevel(Properties.Settings.Default.LogLevel); if (autorun) { messages_level = MessagesLevel.MessagesNone; } // ri is needed to get the user. TODO: Get User without using ri try { ri = new RemoteInfo(); } catch (FlickrNet.Exceptions.LoginFailedInvalidTokenException) { FlickrGetToken(); ri = new RemoteInfo(); } UpdateUser(); LoadConfig(); Reload(); FlickrSync.Log(LogLevel.LogBasic, "Application loaded"); if (autorun) { WindowState = FormWindowState.Minimized; } else { WindowState = FormWindowState.Maximized; } if (!message_tested) { try { webBrowser1.Navigate(Properties.Settings.Default.MessageUrl + "?version=" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()); } catch (Exception) { } } if (autorun) { ViewAndSync(); Close(); } }