Пример #1
0
        public void setRun_button()
        {
            // add state: if initialState = true; then first time link to google no show screen if failed

            // get ini for refreshkey
            iniParser parser = new iniParser();

            if (File.Exists(iniPath))
            {
                parser.IniParser(iniPath);                  //appStartPath + @"\sharefavorite.ini");
                RefreshKey_saved = parser.GetSetting("Setup", "refreshkey");
                //
                RefreshKey_real = parser.GetSetting("Setup", "refreshkey_real");
                if (RefreshKey_real != "")
                {
                    bool result = get_accesstokenfromrefreshtoken();
                    if (result == true)                                  // exchange refresh token with refresh token
                    {
                        RefreshKey_saved = access_token;
                    }
                }
                AutoCompleteBox.Focusable = true;
                Keyboard.Focus(AutoCompleteBox);
                //
                if (RefreshKey_saved == "")
                {
                    if (initialState == true)
                    {
                        myTabControl.SelectedIndex = 0;
                    }
                    else
                    {
                        myTabControl.SelectedIndex = 1;
                    }
                }
                service_oauth();
            }
        }
Пример #2
0
        public void setRun()
        {
            // get ini for refreshkey
            iniParser parser       = new iniParser();
            String    appStartPath = System.IO.Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);

            parser.IniParser(iniPath);  //appStartPath + @"\sharefavorite.ini");
            RefreshKey_saved = parser.GetSetting("Setup", "refreshkey");
            //
            AutoCompleteBox.Focusable = true;
            Keyboard.Focus(AutoCompleteBox);
            //
            if (RefreshKey_saved == "")
            {
                myTabControl.SelectedIndex = 1;
            }
            service_oauth();
        }
Пример #3
0
 public void setRun()
 {
     // get ini for refreshkey
     iniParser parser = new iniParser();
     String appStartPath = System.IO.Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
     parser.IniParser(iniPath);  //appStartPath + @"\sharefavorite.ini");
     RefreshKey_saved = parser.GetSetting("Setup", "refreshkey");
     //
     AutoCompleteBox.Focusable = true;
     Keyboard.Focus(AutoCompleteBox);
     //
     if (RefreshKey_saved == "")
     {
         myTabControl.SelectedIndex = 1;
     }
     service_oauth();
 }