Example #1
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            this.TextCountApi.Text = settingCommon.CountApi.ToString();
            this.TextCountApiReply.Text = settingCommon.CountApiReply.ToString();
            this.GetMoreTextCountApi.Text = settingCommon.MoreCountApi.ToString();
            this.FirstTextCountApi.Text = settingCommon.FirstCountApi.ToString();
            this.SearchTextCountApi.Text = settingCommon.SearchCountApi.ToString();
            this.FavoritesTextCountApi.Text = settingCommon.FavoritesCountApi.ToString();
            this.UserTimelineTextCountApi.Text = settingCommon.UserTimelineCountApi.ToString();
            this.ListTextCountApi.Text = settingCommon.ListCountApi.ToString();
            this.UseChangeGetCount.Checked = settingCommon.UseAdditionalCount;

            this.Label28.Enabled = this.UseChangeGetCount.Checked;
            this.Label30.Enabled = this.UseChangeGetCount.Checked;
            this.Label53.Enabled = this.UseChangeGetCount.Checked;
            this.Label66.Enabled = this.UseChangeGetCount.Checked;
            this.Label17.Enabled = this.UseChangeGetCount.Checked;
            this.Label25.Enabled = this.UseChangeGetCount.Checked;
            this.GetMoreTextCountApi.Enabled = this.UseChangeGetCount.Checked;
            this.FirstTextCountApi.Enabled = this.UseChangeGetCount.Checked;
            this.SearchTextCountApi.Enabled = this.UseChangeGetCount.Checked;
            this.FavoritesTextCountApi.Enabled = this.UseChangeGetCount.Checked;
            this.UserTimelineTextCountApi.Enabled = this.UseChangeGetCount.Checked;
            this.ListTextCountApi.Enabled = this.UseChangeGetCount.Checked;
        }
Example #2
0
        public void LoadConfig(SettingCommon settingCommon, SettingLocal settingLocal)
        {
            this.UReadMng.Checked = settingCommon.UnreadManage;
            this.PlaySnd.Checked = settingCommon.PlaySound;
            this.BrowserPathText.Text = settingLocal.BrowserPath;
            this.CheckCloseToExit.Checked = settingCommon.CloseToExit;
            this.CheckMinimizeToTray.Checked = settingCommon.MinimizeToTray;
            this.CheckFavRestrict.Checked = settingCommon.RestrictFavCheck;
            this.chkReadOwnPost.Checked = settingCommon.ReadOwnPost;
            this.CheckReadOldPosts.Checked = settingCommon.ReadOldPosts;

            this.HotkeyCheck.Checked = settingCommon.HotkeyEnabled;
            this.HotkeyAlt.Checked = ((settingCommon.HotkeyModifier & Keys.Alt) == Keys.Alt);
            this.HotkeyCtrl.Checked = ((settingCommon.HotkeyModifier & Keys.Control) == Keys.Control);
            this.HotkeyShift.Checked = ((settingCommon.HotkeyModifier & Keys.Shift) == Keys.Shift);
            this.HotkeyWin.Checked = ((settingCommon.HotkeyModifier & Keys.LWin) == Keys.LWin);
            this.HotkeyCode.Text = settingCommon.HotkeyValue.ToString();
            this.HotkeyText.Text = settingCommon.HotkeyKey.ToString();
            this.HotkeyText.Tag = settingCommon.HotkeyKey;
            this.HotkeyAlt.Enabled = settingCommon.HotkeyEnabled;
            this.HotkeyShift.Enabled = settingCommon.HotkeyEnabled;
            this.HotkeyCtrl.Enabled = settingCommon.HotkeyEnabled;
            this.HotkeyWin.Enabled = settingCommon.HotkeyEnabled;
            this.HotkeyText.Enabled = settingCommon.HotkeyEnabled;
            this.HotkeyCode.Enabled = settingCommon.HotkeyEnabled;

            this.CheckOpenUserTimeline.Checked = settingCommon.OpenUserTimeline;
            this.ListDoubleClickActionComboBox.SelectedIndex = settingCommon.ListDoubleClickAction;
            this.TabMouseLockCheck.Checked = settingCommon.TabMouseLock;
        }
Example #3
0
        public void LoadConfig(SettingCommon settingCommon, SettingLocal settingLocal)
        {
            this.UReadMng.Checked            = settingCommon.UnreadManage;
            this.PlaySnd.Checked             = settingCommon.PlaySound;
            this.BrowserPathText.Text        = settingLocal.BrowserPath;
            this.CheckCloseToExit.Checked    = settingCommon.CloseToExit;
            this.CheckMinimizeToTray.Checked = settingCommon.MinimizeToTray;
            this.CheckFavRestrict.Checked    = settingCommon.RestrictFavCheck;
            this.chkReadOwnPost.Checked      = settingCommon.ReadOwnPost;
            this.CheckReadOldPosts.Checked   = settingCommon.ReadOldPosts;

            this.HotkeyCheck.Checked = settingCommon.HotkeyEnabled;
            this.HotkeyAlt.Checked   = ((settingCommon.HotkeyModifier & Keys.Alt) == Keys.Alt);
            this.HotkeyCtrl.Checked  = ((settingCommon.HotkeyModifier & Keys.Control) == Keys.Control);
            this.HotkeyShift.Checked = ((settingCommon.HotkeyModifier & Keys.Shift) == Keys.Shift);
            this.HotkeyWin.Checked   = ((settingCommon.HotkeyModifier & Keys.LWin) == Keys.LWin);
            this.HotkeyCode.Text     = settingCommon.HotkeyValue.ToString();
            this.HotkeyText.Text     = settingCommon.HotkeyKey.ToString();
            this.HotkeyText.Tag      = settingCommon.HotkeyKey;
            this.HotkeyAlt.Enabled   = settingCommon.HotkeyEnabled;
            this.HotkeyShift.Enabled = settingCommon.HotkeyEnabled;
            this.HotkeyCtrl.Enabled  = settingCommon.HotkeyEnabled;
            this.HotkeyWin.Enabled   = settingCommon.HotkeyEnabled;
            this.HotkeyText.Enabled  = settingCommon.HotkeyEnabled;
            this.HotkeyCode.Enabled  = settingCommon.HotkeyEnabled;

            this.CheckOpenUserTimeline.Checked = settingCommon.OpenUserTimeline;
            this.ListDoubleClickActionComboBox.SelectedIndex = settingCommon.ListDoubleClickAction;
            this.TabMouseLockCheck.Checked = settingCommon.TabMouseLock;
        }
Example #4
0
        public void SaveConfig(SettingCommon settingCommon, SettingLocal settingLocal)
        {
            settingLocal.StatusText = this.StatusText.Text;

            switch (this.ComboBoxPostKeySelect.SelectedIndex)
            {
                case 2:
                    settingCommon.PostShiftEnter = true;
                    settingCommon.PostCtrlEnter = false;
                    break;
                case 1:
                    settingCommon.PostCtrlEnter = true;
                    settingCommon.PostShiftEnter = false;
                    break;
                case 0:
                    settingCommon.PostCtrlEnter = false;
                    settingCommon.PostShiftEnter = false;
                    break;
            }

            settingLocal.UseRecommendStatus = this.CheckUseRecommendStatus.Checked;
            settingCommon.RetweetNoConfirm = this.CheckRetweetNoConfirm.Checked;
            settingCommon.UseAtIdSupplement = this.CheckAtIdSupple.Checked;
            settingCommon.UseHashSupplement = this.CheckHashSupple.Checked;
        }
Example #5
0
        public void SaveConfig(SettingCommon settingCommon, SettingLocal settingLocal)
        {
            settingCommon.PlaySound = this.PlaySnd.Checked;
            settingCommon.UnreadManage = this.UReadMng.Checked;
            settingLocal.BrowserPath = this.BrowserPathText.Text.Trim();
            settingCommon.CloseToExit = this.CheckCloseToExit.Checked;
            settingCommon.MinimizeToTray = this.CheckMinimizeToTray.Checked;
            settingCommon.RestrictFavCheck = this.CheckFavRestrict.Checked;
            settingCommon.ReadOwnPost = this.chkReadOwnPost.Checked;
            settingCommon.ReadOldPosts = this.CheckReadOldPosts.Checked;

            settingCommon.HotkeyEnabled = this.HotkeyCheck.Checked;
            settingCommon.HotkeyModifier = Keys.None;
            if (this.HotkeyAlt.Checked)
                settingCommon.HotkeyModifier |= Keys.Alt;
            if (this.HotkeyShift.Checked)
                settingCommon.HotkeyModifier |= Keys.Shift;
            if (this.HotkeyCtrl.Checked)
                settingCommon.HotkeyModifier |= Keys.Control;
            if (this.HotkeyWin.Checked)
                settingCommon.HotkeyModifier |= Keys.LWin;
            int.TryParse(this.HotkeyCode.Text, out settingCommon.HotkeyValue);
            settingCommon.HotkeyKey = (Keys)this.HotkeyText.Tag;

            settingCommon.OpenUserTimeline = this.CheckOpenUserTimeline.Checked;
            settingCommon.ListDoubleClickAction = this.ListDoubleClickActionComboBox.SelectedIndex;
            settingCommon.TabMouseLock = this.TabMouseLockCheck.Checked;
        }
Example #6
0
        public void LoadConfig(SettingCommon settingCommon, SettingLocal settingLocal)
        {
            this.BasedPanel.LoadConfig(settingCommon);
            this.GetPeriodPanel.LoadConfig(settingCommon);
            this.StartupPanel.LoadConfig(settingCommon);
            this.TweetPrvPanel.LoadConfig(settingCommon);
            this.TweetActPanel.LoadConfig(settingCommon, settingLocal);
            this.ActionPanel.LoadConfig(settingCommon, settingLocal);
            this.FontPanel.LoadConfig(settingLocal);
            this.FontPanel2.LoadConfig(settingLocal);
            this.PreviewPanel.LoadConfig(settingCommon);
            this.GetCountPanel.LoadConfig(settingCommon);
            this.ShortUrlPanel.LoadConfig(settingCommon);
            this.ProxyPanel.LoadConfig(settingLocal);
            this.CooperatePanel.LoadConfig(settingCommon);
            this.ConnectionPanel.LoadConfig(settingCommon);
            this.NotifyPanel.LoadConfig(settingCommon);

            var activeUser = settingCommon.UserAccounts.FirstOrDefault(x => x.UserId == this.tw.UserId);
            if (activeUser != null)
            {
                this.BasedPanel.AuthUserCombo.SelectedItem = activeUser;
                this.InitialUserId = activeUser.UserId;
            }
        }
Example #7
0
 public void LoadConfig(SettingCommon settingCommon)
 {
     this.ConnectionTimeOut.Text = settingCommon.DefaultTimeOut.ToString();
     this.UploadImageTimeout.Text = settingCommon.UploadImageTimeout.ToString();
     this.checkBoxForceIPv4.Checked = settingCommon.ForceIPv4;
     this.TwitterAPIText.Text = settingCommon.TwitterApiHost;
 }
Example #8
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.TinyUrlResolve    = this.CheckTinyURL.Checked;
     settingCommon.UrlConvertAuto    = this.CheckAutoConvertUrl.Checked;
     settingCommon.AutoShortUrlFirst = (MyCommon.UrlConverter) this.ComboBoxAutoShortUrlFirst.SelectedIndex;
     settingCommon.BitlyAccessToken  = this.TextBitlyAccessToken.Text;
 }
Example #9
0
        public void SaveConfig(SettingCommon settingCommon, SettingLocal settingLocal)
        {
            settingLocal.StatusText = this.StatusText.Text;

            switch (this.ComboBoxPostKeySelect.SelectedIndex)
            {
            case 2:
                settingCommon.PostShiftEnter = true;
                settingCommon.PostCtrlEnter  = false;
                break;

            case 1:
                settingCommon.PostCtrlEnter  = true;
                settingCommon.PostShiftEnter = false;
                break;

            case 0:
                settingCommon.PostCtrlEnter  = false;
                settingCommon.PostShiftEnter = false;
                break;
            }

            settingLocal.UseRecommendStatus  = this.CheckUseRecommendStatus.Checked;
            settingCommon.RetweetNoConfirm   = this.CheckRetweetNoConfirm.Checked;
            settingCommon.UseAtIdSupplement  = this.CheckAtIdSupple.Checked;
            settingCommon.UseHashSupplement  = this.CheckHashSupple.Checked;
            settingCommon.AlphaPNGWorkaround = this.CheckAlphaPNGWorkaround.Checked;
        }
Example #10
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.DefaultTimeOut     = int.Parse(this.ConnectionTimeOut.Text);
     settingCommon.UploadImageTimeout = int.Parse(this.UploadImageTimeout.Text);
     settingCommon.ForceIPv4          = this.checkBoxForceIPv4.Checked;
     settingCommon.TwitterApiHost     = this.TwitterAPIText.Text.Trim();
 }
Example #11
0
 public void LoadConfig(SettingCommon settingCommon)
 {
     this.ConnectionTimeOut.Text    = settingCommon.DefaultTimeOut.ToString();
     this.UploadImageTimeout.Text   = settingCommon.UploadImageTimeout.ToString();
     this.checkBoxForceIPv4.Checked = settingCommon.ForceIPv4;
     this.TwitterAPIText.Text       = settingCommon.TwitterApiHost;
 }
Example #12
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.Read = this.StartupReaded.Checked;
     settingCommon.StartupVersion = this.CheckStartupVersion.Checked;
     settingCommon.StartupFollowers = this.CheckStartupFollowers.Checked;
     settingCommon.GetFav = this.chkGetFav.Checked;
 }
Example #13
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.Read             = this.StartupReaded.Checked;
     settingCommon.StartupVersion   = this.CheckStartupVersion.Checked;
     settingCommon.StartupFollowers = this.CheckStartupFollowers.Checked;
     settingCommon.GetFav           = this.chkGetFav.Checked;
 }
Example #14
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.DefaultTimeOut = int.Parse(this.ConnectionTimeOut.Text);
     settingCommon.UploadImageTimeout = int.Parse(this.UploadImageTimeout.Text);
     settingCommon.ForceIPv4 = this.checkBoxForceIPv4.Checked;
     settingCommon.TwitterApiHost = this.TwitterAPIText.Text.Trim();
 }
Example #15
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            this.TextCountApi.Text             = settingCommon.CountApi.ToString();
            this.TextCountApiReply.Text        = settingCommon.CountApiReply.ToString();
            this.GetMoreTextCountApi.Text      = settingCommon.MoreCountApi.ToString();
            this.FirstTextCountApi.Text        = settingCommon.FirstCountApi.ToString();
            this.SearchTextCountApi.Text       = settingCommon.SearchCountApi.ToString();
            this.FavoritesTextCountApi.Text    = settingCommon.FavoritesCountApi.ToString();
            this.UserTimelineTextCountApi.Text = settingCommon.UserTimelineCountApi.ToString();
            this.ListTextCountApi.Text         = settingCommon.ListCountApi.ToString();
            this.UseChangeGetCount.Checked     = settingCommon.UseAdditionalCount;

            this.Label28.Enabled                  = this.UseChangeGetCount.Checked;
            this.Label30.Enabled                  = this.UseChangeGetCount.Checked;
            this.Label53.Enabled                  = this.UseChangeGetCount.Checked;
            this.Label66.Enabled                  = this.UseChangeGetCount.Checked;
            this.Label17.Enabled                  = this.UseChangeGetCount.Checked;
            this.Label25.Enabled                  = this.UseChangeGetCount.Checked;
            this.GetMoreTextCountApi.Enabled      = this.UseChangeGetCount.Checked;
            this.FirstTextCountApi.Enabled        = this.UseChangeGetCount.Checked;
            this.SearchTextCountApi.Enabled       = this.UseChangeGetCount.Checked;
            this.FavoritesTextCountApi.Enabled    = this.UseChangeGetCount.Checked;
            this.UserTimelineTextCountApi.Enabled = this.UseChangeGetCount.Checked;
            this.ListTextCountApi.Enabled         = this.UseChangeGetCount.Checked;
        }
Example #16
0
        public void SaveConfig(SettingCommon settingCommon)
        {
            switch (this.IconSize.SelectedIndex)
            {
            case 0:
                settingCommon.IconSize = MyCommon.IconSizes.IconNone;
                break;

            case 1:
                settingCommon.IconSize = MyCommon.IconSizes.Icon16;
                break;

            case 2:
                settingCommon.IconSize = MyCommon.IconSizes.Icon24;
                break;

            case 3:
                settingCommon.IconSize = MyCommon.IconSizes.Icon48;
                break;

            case 4:
                settingCommon.IconSize = MyCommon.IconSizes.Icon48_2;
                break;
            }

            settingCommon.OneWayLove             = this.OneWayLv.Checked;
            settingCommon.SortOrderLock          = this.CheckSortOrderLock.Checked;
            settingCommon.ViewTabBottom          = this.CheckViewTabBottom.Checked;
            settingCommon.UseUnreadStyle         = this.chkUnreadStyle.Checked;
            settingCommon.DateTimeFormat         = this.CmbDateTimeFormat.Text;
            settingCommon.ShowGrid               = this.CheckShowGrid.Checked;
            settingCommon.HideDuplicatedRetweets = this.HideDuplicatedRetweetsCheck.Checked;
            settingCommon.IsListsIncludeRts      = this.IsListsIncludeRtsCheckBox.Checked;
        }
Example #17
0
 public void LoadConfig(SettingCommon settingCommon)
 {
     using (ControlTransaction.Update(this.AuthUserCombo))
     {
         this.AuthUserCombo.Items.Clear();
         this.AuthUserCombo.Items.AddRange(settingCommon.UserAccounts.ToArray());
     }
 }
Example #18
0
 public void LoadConfig(SettingCommon settingCommon)
 {
     using (ControlTransaction.Update(this.AuthUserCombo))
     {
         this.AuthUserCombo.Items.Clear();
         this.AuthUserCombo.Items.AddRange(settingCommon.UserAccounts.ToArray());
     }
 }
Example #19
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.EventNotifyEnabled = this.CheckEventNotify.Checked;
     this.GetEventNotifyFlag(ref settingCommon.EventNotifyFlag, ref settingCommon.IsMyEventNotifyFlag);
     settingCommon.ForceEventNotify  = this.CheckForceEventNotify.Checked;
     settingCommon.FavEventUnread    = this.CheckFavEventUnread.Checked;
     settingCommon.EventSoundFile    = (string)this.ComboBoxEventNotifySound.SelectedItem;
     settingCommon.IsRemoveSameEvent = this.IsRemoveSameFavEventCheckBox.Checked;
 }
Example #20
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.EventNotifyEnabled = this.CheckEventNotify.Checked;
     this.GetEventNotifyFlag(ref settingCommon.EventNotifyFlag, ref settingCommon.IsMyEventNotifyFlag);
     settingCommon.ForceEventNotify = this.CheckForceEventNotify.Checked;
     settingCommon.FavEventUnread = this.CheckFavEventUnread.Checked;
     settingCommon.EventSoundFile = (string)this.ComboBoxEventNotifySound.SelectedItem;
     settingCommon.IsRemoveSameEvent = this.IsRemoveSameFavEventCheckBox.Checked;
 }
Example #21
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.TinyUrlResolve = this.CheckTinyURL.Checked;
     settingCommon.UrlConvertAuto = this.CheckAutoConvertUrl.Checked;
     //settingCommon.ShortenTco = this.ShortenTcoCheck.Checked;
     settingCommon.AutoShortUrlFirst = (MyCommon.UrlConverter) this.ComboBoxAutoShortUrlFirst.SelectedIndex;
     settingCommon.BilyUser          = this.TextBitlyId.Text;
     settingCommon.BitlyPwd          = this.TextBitlyPw.Text;
 }
Example #22
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.TinyUrlResolve = this.CheckTinyURL.Checked;
     settingCommon.UrlConvertAuto = this.CheckAutoConvertUrl.Checked;
     //settingCommon.ShortenTco = this.ShortenTcoCheck.Checked;
     settingCommon.AutoShortUrlFirst = (MyCommon.UrlConverter)this.ComboBoxAutoShortUrlFirst.SelectedIndex;
     settingCommon.BilyUser = this.TextBitlyId.Text;
     settingCommon.BitlyPwd = this.TextBitlyPw.Text;
 }
Example #23
0
    public override void Start()
    {
        backBtn = transform.Find("Back").GetComponent <Button>();

        settingCommon = transform.Find("SettingCommon").GetComponent <SettingCommon>();
        settingInput  = transform.Find("SettingInput").GetComponent <SettingInput>();
        settingVideo  = transform.Find("SettingVideo").GetComponent <SettingVideo>();

        backBtn.onClick.AddListener(Hide);
        base.Start();
    }
Example #24
0
 public void LoadConfig(SettingCommon settingCommon)
 {
     this.CheckNicoms.Checked = settingCommon.Nicoms;
     this.ComboBoxTranslateLanguage.SelectedIndex = Bing.GetIndexFromLanguageEnum(settingCommon.TranslateLanguage);
     this.UserAppointUrlText.Text = settingCommon.UserAppointUrl;
     this.EnableImgAzyobuziNetCheckBox.Checked = settingCommon.EnableImgAzyobuziNet;
     this.ImgAzyobuziNetDisabledInDMCheckBox.Checked = settingCommon.ImgAzyobuziNetDisabledInDM;
     this.MapThumbnailProviderComboBox.SelectedIndex = (int)settingCommon.MapThumbnailProvider;
     this.MapThumbnailHeightTextBox.Text = settingCommon.MapThumbnailHeight.ToString();
     this.MapThumbnailWidthTextBox.Text = settingCommon.MapThumbnailWidth.ToString();
     this.MapThumbnailZoomTextBox.Text = settingCommon.MapThumbnailZoom.ToString();
 }
Example #25
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.CountApi = int.Parse(this.TextCountApi.Text);
     settingCommon.CountApiReply = int.Parse(this.TextCountApiReply.Text);
     settingCommon.UseAdditionalCount = this.UseChangeGetCount.Checked;
     settingCommon.MoreCountApi = int.Parse(this.GetMoreTextCountApi.Text);
     settingCommon.FirstCountApi = int.Parse(this.FirstTextCountApi.Text);
     settingCommon.SearchCountApi = int.Parse(this.SearchTextCountApi.Text);
     settingCommon.FavoritesCountApi = int.Parse(this.FavoritesTextCountApi.Text);
     settingCommon.UserTimelineCountApi = int.Parse(this.UserTimelineTextCountApi.Text);
     settingCommon.ListCountApi = int.Parse(this.ListTextCountApi.Text);
 }
Example #26
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.Nicoms = this.CheckNicoms.Checked;
     settingCommon.TranslateLanguage = Bing.GetLanguageEnumFromIndex(this.ComboBoxTranslateLanguage.SelectedIndex);
     settingCommon.UserAppointUrl = this.UserAppointUrlText.Text;
     settingCommon.EnableImgAzyobuziNet = this.EnableImgAzyobuziNetCheckBox.Checked;
     settingCommon.ImgAzyobuziNetDisabledInDM = this.ImgAzyobuziNetDisabledInDMCheckBox.Checked;
     settingCommon.MapThumbnailProvider = (MapProvider)this.MapThumbnailProviderComboBox.SelectedIndex;
     settingCommon.MapThumbnailHeight = int.Parse(this.MapThumbnailHeightTextBox.Text);
     settingCommon.MapThumbnailWidth = int.Parse(this.MapThumbnailWidthTextBox.Text);
     settingCommon.MapThumbnailZoom = int.Parse(this.MapThumbnailZoomTextBox.Text);
 }
Example #27
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            this.CheckTinyURL.Checked = settingCommon.TinyUrlResolve;

            // 使われていない設定項目 (Tween v1.0.5.0)
            this.CheckAutoConvertUrl.Checked = false;
            this.ShortenTcoCheck.Enabled     = this.CheckAutoConvertUrl.Checked;

            this.ComboBoxAutoShortUrlFirst.SelectedIndex = (int)settingCommon.AutoShortUrlFirst;
            this.TextBitlyAccessToken.Text     = settingCommon.BitlyAccessToken;
            this.TextBitlyAccessToken.Modified = false;
        }
Example #28
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            this.StartupReaded.Checked = settingCommon.Read;
            this.StartupReaded.Enabled = settingCommon.UnreadManage;

            this.CheckStartupVersion.Checked = settingCommon.StartupVersion;
            if (ApplicationSettings.VersionInfoUrl == null)
                this.CheckStartupVersion.Enabled = false; // 更新チェック無効化

            this.CheckStartupFollowers.Checked = settingCommon.StartupFollowers;
            this.chkGetFav.Checked = settingCommon.GetFav;
        }
Example #29
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            switch (settingCommon.IconSize)
            {
            case MyCommon.IconSizes.IconNone:
                this.IconSize.SelectedIndex = 0;
                break;

            case MyCommon.IconSizes.Icon16:
                this.IconSize.SelectedIndex = 1;
                break;

            case MyCommon.IconSizes.Icon24:
                this.IconSize.SelectedIndex = 2;
                break;

            case MyCommon.IconSizes.Icon48:
                this.IconSize.SelectedIndex = 3;
                break;

            case MyCommon.IconSizes.Icon48_2:
                this.IconSize.SelectedIndex = 4;
                break;
            }

            this.OneWayLv.Checked           = settingCommon.OneWayLove;
            this.CheckSortOrderLock.Checked = settingCommon.SortOrderLock;
            this.CheckViewTabBottom.Checked = settingCommon.ViewTabBottom;
            this.chkUnreadStyle.Checked     = settingCommon.UseUnreadStyle;

            //書式指定文字列エラーチェック
            var dateTimeFormat = settingCommon.DateTimeFormat;

            try
            {
                if (DateTimeUtc.Now.ToLocalTimeString(dateTimeFormat).Length == 0)
                {
                    // このブロックは絶対に実行されないはず
                    // 変換が成功した場合にLengthが0にならない
                    dateTimeFormat = "yyyy/MM/dd H:mm:ss";
                }
            }
            catch (FormatException)
            {
                // FormatExceptionが発生したら初期値を設定 (=yyyy/MM/dd H:mm:ssとみなされる)
                dateTimeFormat = "yyyy/MM/dd H:mm:ss";
            }
            this.CmbDateTimeFormat.Text = dateTimeFormat;

            this.CheckShowGrid.Checked = settingCommon.ShowGrid;
            this.HideDuplicatedRetweetsCheck.Checked = settingCommon.HideDuplicatedRetweets;
            this.IsListsIncludeRtsCheckBox.Checked   = settingCommon.IsListsIncludeRts;
        }
Example #30
0
 public void LoadConfig(SettingCommon settingCommon)
 {
     this.StartupUserstreamCheck.Checked = settingCommon.UserstreamStartup;
     this.CheckPostAndGet.Checked = settingCommon.PostAndGet;
     this.UserstreamPeriod.Text = settingCommon.UserstreamPeriod.ToString();
     this.TimelinePeriod.Text = settingCommon.TimelinePeriod.ToString();
     this.ReplyPeriod.Text = settingCommon.ReplyPeriod.ToString();
     this.DMPeriod.Text = settingCommon.DMPeriod.ToString();
     this.PubSearchPeriod.Text = settingCommon.PubSearchPeriod.ToString();
     this.ListsPeriod.Text = settingCommon.ListsPeriod.ToString();
     this.UserTimelinePeriod.Text = settingCommon.UserTimelinePeriod.ToString();
 }
Example #31
0
 public void LoadConfig(SettingCommon settingCommon)
 {
     this.CheckNicoms.Checked = settingCommon.Nicoms;
     this.ComboBoxTranslateLanguage.SelectedIndex = Bing.GetIndexFromLanguageEnum(settingCommon.TranslateLanguage);
     this.UserAppointUrlText.Text = settingCommon.UserAppointUrl;
     this.EnableImgAzyobuziNetCheckBox.Checked       = settingCommon.EnableImgAzyobuziNet;
     this.ImgAzyobuziNetDisabledInDMCheckBox.Checked = settingCommon.ImgAzyobuziNetDisabledInDM;
     this.MapThumbnailProviderComboBox.SelectedIndex = (int)settingCommon.MapThumbnailProvider;
     this.MapThumbnailHeightTextBox.Text             = settingCommon.MapThumbnailHeight.ToString();
     this.MapThumbnailWidthTextBox.Text = settingCommon.MapThumbnailWidth.ToString();
     this.MapThumbnailZoomTextBox.Text  = settingCommon.MapThumbnailZoom.ToString();
 }
Example #32
0
 public void LoadConfig(SettingCommon settingCommon)
 {
     this.StartupUserstreamCheck.Checked = settingCommon.UserstreamStartup;
     this.CheckPostAndGet.Checked        = settingCommon.PostAndGet;
     this.UserstreamPeriod.Text          = settingCommon.UserstreamPeriod.ToString();
     this.TimelinePeriod.Text            = settingCommon.TimelinePeriod.ToString();
     this.ReplyPeriod.Text        = settingCommon.ReplyPeriod.ToString();
     this.DMPeriod.Text           = settingCommon.DMPeriod.ToString();
     this.PubSearchPeriod.Text    = settingCommon.PubSearchPeriod.ToString();
     this.ListsPeriod.Text        = settingCommon.ListsPeriod.ToString();
     this.UserTimelinePeriod.Text = settingCommon.UserTimelinePeriod.ToString();
 }
Example #33
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.Nicoms                     = this.CheckNicoms.Checked;
     settingCommon.TranslateLanguage          = Bing.GetLanguageEnumFromIndex(this.ComboBoxTranslateLanguage.SelectedIndex);
     settingCommon.UserAppointUrl             = this.UserAppointUrlText.Text;
     settingCommon.EnableImgAzyobuziNet       = this.EnableImgAzyobuziNetCheckBox.Checked;
     settingCommon.ImgAzyobuziNetDisabledInDM = this.ImgAzyobuziNetDisabledInDMCheckBox.Checked;
     settingCommon.MapThumbnailProvider       = (MapProvider)this.MapThumbnailProviderComboBox.SelectedIndex;
     settingCommon.MapThumbnailHeight         = int.Parse(this.MapThumbnailHeightTextBox.Text);
     settingCommon.MapThumbnailWidth          = int.Parse(this.MapThumbnailWidthTextBox.Text);
     settingCommon.MapThumbnailZoom           = int.Parse(this.MapThumbnailZoomTextBox.Text);
 }
Example #34
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.CountApi             = int.Parse(this.TextCountApi.Text);
     settingCommon.CountApiReply        = int.Parse(this.TextCountApiReply.Text);
     settingCommon.UseAdditionalCount   = this.UseChangeGetCount.Checked;
     settingCommon.MoreCountApi         = int.Parse(this.GetMoreTextCountApi.Text);
     settingCommon.FirstCountApi        = int.Parse(this.FirstTextCountApi.Text);
     settingCommon.SearchCountApi       = int.Parse(this.SearchTextCountApi.Text);
     settingCommon.FavoritesCountApi    = int.Parse(this.FavoritesTextCountApi.Text);
     settingCommon.UserTimelineCountApi = int.Parse(this.UserTimelineTextCountApi.Text);
     settingCommon.ListCountApi         = int.Parse(this.ListTextCountApi.Text);
 }
Example #35
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            this.StartupReaded.Checked = settingCommon.Read;
            this.StartupReaded.Enabled = settingCommon.UnreadManage;

            this.CheckStartupVersion.Checked = settingCommon.StartupVersion;
            if (ApplicationSettings.VersionInfoUrl == null)
            {
                this.CheckStartupVersion.Enabled = false; // 更新チェック無効化
            }
            this.CheckStartupFollowers.Checked = settingCommon.StartupFollowers;
            this.chkGetFav.Checked             = settingCommon.GetFav;
        }
Example #36
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            this.ApplyEventNotifyFlag(settingCommon.EventNotifyEnabled, settingCommon.EventNotifyFlag, settingCommon.IsMyEventNotifyFlag);
            this.CheckForceEventNotify.Checked = settingCommon.ForceEventNotify;
            this.CheckFavEventUnread.Checked = settingCommon.FavEventUnread;

            this.SoundFileListup();

            var soundFile = settingCommon.EventSoundFile ?? "";
            var soundFileIdx = this.ComboBoxEventNotifySound.Items.IndexOf(soundFile);
            if (soundFileIdx != -1)
                this.ComboBoxEventNotifySound.SelectedIndex = soundFileIdx;

            this.IsRemoveSameFavEventCheckBox.Checked = settingCommon.IsRemoveSameEvent;
        }
Example #37
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            switch (settingCommon.IconSize)
            {
                case MyCommon.IconSizes.IconNone:
                    this.IconSize.SelectedIndex = 0;
                    break;
                case MyCommon.IconSizes.Icon16:
                    this.IconSize.SelectedIndex = 1;
                    break;
                case MyCommon.IconSizes.Icon24:
                    this.IconSize.SelectedIndex = 2;
                    break;
                case MyCommon.IconSizes.Icon48:
                    this.IconSize.SelectedIndex = 3;
                    break;
                case MyCommon.IconSizes.Icon48_2:
                    this.IconSize.SelectedIndex = 4;
                    break;
            }

            this.OneWayLv.Checked = settingCommon.OneWayLove;
            this.CheckSortOrderLock.Checked = settingCommon.SortOrderLock;
            this.CheckViewTabBottom.Checked = settingCommon.ViewTabBottom;
            this.chkUnreadStyle.Checked = settingCommon.UseUnreadStyle;

            //書式指定文字列エラーチェック
            var dateTimeFormat = settingCommon.DateTimeFormat;
            try
            {
                if (DateTime.Now.ToString(dateTimeFormat).Length == 0)
                {
                    // このブロックは絶対に実行されないはず
                    // 変換が成功した場合にLengthが0にならない
                    dateTimeFormat = "yyyy/MM/dd H:mm:ss";
                }
            }
            catch (FormatException)
            {
                // FormatExceptionが発生したら初期値を設定 (=yyyy/MM/dd H:mm:ssとみなされる)
                dateTimeFormat = "yyyy/MM/dd H:mm:ss";
            }
            this.CmbDateTimeFormat.Text = dateTimeFormat;

            this.CheckShowGrid.Checked = settingCommon.ShowGrid;
            this.HideDuplicatedRetweetsCheck.Checked = settingCommon.HideDuplicatedRetweets;
            this.IsListsIncludeRtsCheckBox.Checked = settingCommon.IsListsIncludeRts;
        }
Example #38
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            this.CheckTinyURL.Checked = settingCommon.TinyUrlResolve;

            // 使われていない設定項目 (Tween v1.0.5.0)
            this.CheckAutoConvertUrl.Checked = false;
            //this.CheckAutoConvertUrl.Checked = settingCommon.UrlConvertAuto;
            //this.ShortenTcoCheck.Checked = settingCommon.ShortenTco;
            this.ShortenTcoCheck.Enabled = this.CheckAutoConvertUrl.Checked;

            this.ComboBoxAutoShortUrlFirst.SelectedIndex = (int)settingCommon.AutoShortUrlFirst;
            this.TextBitlyId.Text = settingCommon.BilyUser;
            this.TextBitlyPw.Text = settingCommon.BitlyPwd;
            this.TextBitlyId.Modified = false;
            this.TextBitlyPw.Modified = false;
        }
Example #39
0
 public void LoadConfig(SettingCommon settingCommon)
 {
     this.cmbNameBalloon.SelectedIndex = settingCommon.NameBalloon switch
     {
         MyCommon.NameBalloonEnum.None => 0,
         MyCommon.NameBalloonEnum.UserID => 1,
         MyCommon.NameBalloonEnum.NickName => 2,
         _ => 2,
     };
     this.CheckDispUsername.Checked    = settingCommon.DispUsername;
     this.ComboDispTitle.SelectedIndex = settingCommon.DispLatestPost switch
     {
         MyCommon.DispTitleEnum.None => 0,
         MyCommon.DispTitleEnum.Ver => 1,
         MyCommon.DispTitleEnum.Post => 2,
         MyCommon.DispTitleEnum.UnreadRepCount => 3,
         MyCommon.DispTitleEnum.UnreadAllCount => 4,
         MyCommon.DispTitleEnum.UnreadAllRepCount => 5,
         MyCommon.DispTitleEnum.UnreadCountAllCount => 6,
         MyCommon.DispTitleEnum.OwnStatus => 7,
         _ => 2,
     };
     this.CheckAlwaysTop.Checked            = settingCommon.AlwaysTop;
     this.CheckBalloonLimit.Checked         = settingCommon.LimitBalloon;
     this.chkTabIconDisp.Checked            = settingCommon.TabIconDisp;
     this.CheckMonospace.Checked            = settingCommon.IsMonospace;
     this.CheckPreviewEnable.Checked        = settingCommon.PreviewEnable;
     this.CheckStatusAreaAtBottom.Checked   = settingCommon.StatusAreaAtBottom;
     this.ReplyIconStateCombo.SelectedIndex = settingCommon.ReplyIconState switch
     {
         MyCommon.REPLY_ICONSTATE.None => 0,
         MyCommon.REPLY_ICONSTATE.StaticIcon => 1,
         MyCommon.REPLY_ICONSTATE.BlinkIcon => 2,
         _ => 1,
     };
     this.LanguageCombo.SelectedIndex = settingCommon.Language switch
     {
         "OS" => 0,
         "ja" => 1,
         "en" => 2,
         _ => 0,
     };
     this.ChkNewMentionsBlink.Checked      = settingCommon.BlinkNewMentions;
     this.IsNotifyUseGrowlCheckBox.Checked = settingCommon.IsUseNotifyGrowl;
     this.IsNotifyUseGrowlCheckBox.Enabled = GrowlHelper.IsDllExists;
 }
Example #40
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.NameBalloon = this.cmbNameBalloon.SelectedIndex switch
     {
         0 => MyCommon.NameBalloonEnum.None,
         1 => MyCommon.NameBalloonEnum.UserID,
         2 => MyCommon.NameBalloonEnum.NickName,
         _ => throw new IndexOutOfRangeException(),
     };
     settingCommon.DispUsername   = this.CheckDispUsername.Checked;
     settingCommon.DispLatestPost = this.ComboDispTitle.SelectedIndex switch
     {
         0 => MyCommon.DispTitleEnum.None,
         1 => MyCommon.DispTitleEnum.Ver,
         2 => MyCommon.DispTitleEnum.Post,
         3 => MyCommon.DispTitleEnum.UnreadRepCount,
         4 => MyCommon.DispTitleEnum.UnreadAllCount,
         5 => MyCommon.DispTitleEnum.UnreadAllRepCount,
         6 => MyCommon.DispTitleEnum.UnreadCountAllCount,
         7 => MyCommon.DispTitleEnum.OwnStatus,
         _ => throw new IndexOutOfRangeException(),
     };
     settingCommon.AlwaysTop          = this.CheckAlwaysTop.Checked;
     settingCommon.LimitBalloon       = this.CheckBalloonLimit.Checked;
     settingCommon.TabIconDisp        = this.chkTabIconDisp.Checked;
     settingCommon.IsMonospace        = this.CheckMonospace.Checked;
     settingCommon.PreviewEnable      = this.CheckPreviewEnable.Checked;
     settingCommon.StatusAreaAtBottom = this.CheckStatusAreaAtBottom.Checked;
     settingCommon.ReplyIconState     = this.ReplyIconStateCombo.SelectedIndex switch
     {
         0 => MyCommon.REPLY_ICONSTATE.None,
         1 => MyCommon.REPLY_ICONSTATE.StaticIcon,
         2 => MyCommon.REPLY_ICONSTATE.BlinkIcon,
         _ => throw new IndexOutOfRangeException(),
     };
     settingCommon.Language = this.LanguageCombo.SelectedIndex switch
     {
         0 => "OS",
         1 => "ja",
         2 => "en",
         _ => "en",
     };
     settingCommon.BlinkNewMentions = this.ChkNewMentionsBlink.Checked;
     settingCommon.IsUseNotifyGrowl = this.IsNotifyUseGrowlCheckBox.Checked;
 }
Example #41
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            this.ApplyEventNotifyFlag(settingCommon.EventNotifyEnabled, settingCommon.EventNotifyFlag, settingCommon.IsMyEventNotifyFlag);
            this.CheckForceEventNotify.Checked = settingCommon.ForceEventNotify;
            this.CheckFavEventUnread.Checked   = settingCommon.FavEventUnread;

            this.SoundFileListup();

            var soundFile    = settingCommon.EventSoundFile ?? "";
            var soundFileIdx = this.ComboBoxEventNotifySound.Items.IndexOf(soundFile);

            if (soundFileIdx != -1)
            {
                this.ComboBoxEventNotifySound.SelectedIndex = soundFileIdx;
            }

            this.IsRemoveSameFavEventCheckBox.Checked = settingCommon.IsRemoveSameEvent;
        }
Example #42
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.IconSize = this.IconSize.SelectedIndex switch
     {
         0 => MyCommon.IconSizes.IconNone,
         1 => MyCommon.IconSizes.Icon16,
         2 => MyCommon.IconSizes.Icon24,
         3 => MyCommon.IconSizes.Icon48,
         4 => MyCommon.IconSizes.Icon48_2,
         _ => throw new IndexOutOfRangeException($"Invalid {nameof(IconSize)} index: {this.IconSize.SelectedIndex}"),
     };
     settingCommon.OneWayLove             = this.OneWayLv.Checked;
     settingCommon.SortOrderLock          = this.CheckSortOrderLock.Checked;
     settingCommon.ViewTabBottom          = this.CheckViewTabBottom.Checked;
     settingCommon.UseUnreadStyle         = this.chkUnreadStyle.Checked;
     settingCommon.DateTimeFormat         = this.CmbDateTimeFormat.Text;
     settingCommon.ShowGrid               = this.CheckShowGrid.Checked;
     settingCommon.HideDuplicatedRetweets = this.HideDuplicatedRetweetsCheck.Checked;
     settingCommon.IsListsIncludeRts      = this.IsListsIncludeRtsCheckBox.Checked;
 }
Example #43
0
        public static void LoadCommon()
        {
            var settings = SettingCommon.Load();

            if (settings.UserAccounts == null || settings.UserAccounts.Count == 0)
            {
                settings.UserAccounts = new List <UserAccount>();
                if (!string.IsNullOrEmpty(settings.UserName))
                {
                    UserAccount account = new UserAccount();
                    account.Username    = settings.UserName;
                    account.UserId      = settings.UserId;
                    account.Token       = settings.Token;
                    account.TokenSecret = settings.TokenSecret;

                    settings.UserAccounts.Add(account);
                }
            }

            SettingManager.Common = settings;
        }
Example #44
0
        public void LoadConfig(SettingCommon settingCommon, SettingLocal settingLocal)
        {
            this.StatusText.Text = settingLocal.StatusText;

            if (settingCommon.PostCtrlEnter)
            {
                this.ComboBoxPostKeySelect.SelectedIndex = 1;
            }
            else if (settingCommon.PostShiftEnter)
            {
                this.ComboBoxPostKeySelect.SelectedIndex = 2;
            }
            else
            {
                this.ComboBoxPostKeySelect.SelectedIndex = 0;
            }

            this.CheckUseRecommendStatus.Checked = settingLocal.UseRecommendStatus;
            this.CheckRetweetNoConfirm.Checked = settingCommon.RetweetNoConfirm;
            this.CheckAtIdSupple.Checked = settingCommon.UseAtIdSupplement;
            this.CheckHashSupple.Checked = settingCommon.UseHashSupplement;
        }
Example #45
0
        public void LoadConfig(SettingCommon settingCommon, SettingLocal settingLocal)
        {
            this.StatusText.Text = settingLocal.StatusText;

            if (settingCommon.PostCtrlEnter)
            {
                this.ComboBoxPostKeySelect.SelectedIndex = 1;
            }
            else if (settingCommon.PostShiftEnter)
            {
                this.ComboBoxPostKeySelect.SelectedIndex = 2;
            }
            else
            {
                this.ComboBoxPostKeySelect.SelectedIndex = 0;
            }

            this.CheckUseRecommendStatus.Checked = settingLocal.UseRecommendStatus;
            this.CheckRetweetNoConfirm.Checked   = settingCommon.RetweetNoConfirm;
            this.CheckAtIdSupple.Checked         = settingCommon.UseAtIdSupplement;
            this.CheckHashSupple.Checked         = settingCommon.UseHashSupplement;
        }
Example #46
0
        public static void LoadCommon()
        {
            var settings = SettingCommon.Load();

            if (settings.UserAccounts == null || settings.UserAccounts.Count == 0)
            {
                settings.UserAccounts = new List <UserAccount>();
                if (!MyCommon.IsNullOrEmpty(settings.UserName))
                {
                    var account = new UserAccount
                    {
                        Username    = settings.UserName,
                        UserId      = settings.UserId,
                        Token       = settings.Token,
                        TokenSecret = settings.TokenSecret,
                    };

                    settings.UserAccounts.Add(account);
                }
            }

            SettingManager.Common = settings;
        }
Example #47
0
        public void SaveConfig(SettingCommon settingCommon, SettingLocal settingLocal)
        {
            settingCommon.PlaySound        = this.PlaySnd.Checked;
            settingCommon.UnreadManage     = this.UReadMng.Checked;
            settingLocal.BrowserPath       = this.BrowserPathText.Text.Trim();
            settingCommon.CloseToExit      = this.CheckCloseToExit.Checked;
            settingCommon.MinimizeToTray   = this.CheckMinimizeToTray.Checked;
            settingCommon.RestrictFavCheck = this.CheckFavRestrict.Checked;
            settingCommon.ReadOwnPost      = this.chkReadOwnPost.Checked;
            settingCommon.ReadOldPosts     = this.CheckReadOldPosts.Checked;

            settingCommon.HotkeyEnabled  = this.HotkeyCheck.Checked;
            settingCommon.HotkeyModifier = Keys.None;
            if (this.HotkeyAlt.Checked)
            {
                settingCommon.HotkeyModifier |= Keys.Alt;
            }
            if (this.HotkeyShift.Checked)
            {
                settingCommon.HotkeyModifier |= Keys.Shift;
            }
            if (this.HotkeyCtrl.Checked)
            {
                settingCommon.HotkeyModifier |= Keys.Control;
            }
            if (this.HotkeyWin.Checked)
            {
                settingCommon.HotkeyModifier |= Keys.LWin;
            }
            int.TryParse(this.HotkeyCode.Text, out settingCommon.HotkeyValue);
            settingCommon.HotkeyKey = (Keys)this.HotkeyText.Tag;

            settingCommon.OpenUserTimeline      = this.CheckOpenUserTimeline.Checked;
            settingCommon.ListDoubleClickAction = this.ListDoubleClickActionComboBox.SelectedIndex;
            settingCommon.TabMouseLock          = this.TabMouseLockCheck.Checked;
        }
Example #48
0
        private void LoadConfig()
        {
            _cfgCommon = SettingCommon.Load();
            if (_cfgCommon.UserAccounts == null || _cfgCommon.UserAccounts.Count == 0)
            {
                _cfgCommon.UserAccounts = new List<UserAccount>();
                if (!string.IsNullOrEmpty(_cfgCommon.UserName))
                {
                    UserAccount account = new UserAccount();
                    account.Username = _cfgCommon.UserName;
                    account.UserId = _cfgCommon.UserId;
                    account.Token = _cfgCommon.Token;
                    account.TokenSecret = _cfgCommon.TokenSecret;

                    _cfgCommon.UserAccounts.Add(account);
                }
            }
            _cfgLocal = SettingLocal.Load();
            List<TabClass> tabs = SettingTabs.Load().Tabs;
            foreach (TabClass tb in tabs)
            {
                try
                {
                    _statuses.Tabs.Add(tb.TabName, tb);
                }
                catch (Exception)
                {
                    tb.TabName = _statuses.GetUniqueTabName();
                    _statuses.Tabs.Add(tb.TabName, tb);
                }
            }
            if (_statuses.Tabs.Count == 0)
            {
                _statuses.AddTab(MyCommon.DEFAULTTAB.RECENT, MyCommon.TabUsageType.Home, null);
                _statuses.AddTab(MyCommon.DEFAULTTAB.REPLY, MyCommon.TabUsageType.Mentions, null);
                _statuses.AddTab(MyCommon.DEFAULTTAB.DM, MyCommon.TabUsageType.DirectMessage, null);
                _statuses.AddTab(MyCommon.DEFAULTTAB.FAV, MyCommon.TabUsageType.Favorites, null);
            }
        }
Example #49
0
        private void LoadConfig()
        {
            _cfgCommon = SettingCommon.Load();
            SettingCommon.Instance = this._cfgCommon;
            if (_cfgCommon.UserAccounts == null || _cfgCommon.UserAccounts.Count == 0)
            {
                _cfgCommon.UserAccounts = new List<UserAccount>();
                if (!string.IsNullOrEmpty(_cfgCommon.UserName))
                {
                    UserAccount account = new UserAccount();
                    account.Username = _cfgCommon.UserName;
                    account.UserId = _cfgCommon.UserId;
                    account.Token = _cfgCommon.Token;
                    account.TokenSecret = _cfgCommon.TokenSecret;

                    _cfgCommon.UserAccounts.Add(account);
                }
            }

            _cfgLocal = SettingLocal.Load();

            // v1.2.4 以前の設定には ScaleDimension の項目がないため、現在の DPI と同じとして扱う
            if (_cfgLocal.ScaleDimension.IsEmpty)
                _cfgLocal.ScaleDimension = this.CurrentAutoScaleDimensions;

            var tabsSetting = SettingTabs.Load().Tabs;
            foreach (var tabSetting in tabsSetting)
            {
                TabModel tab;
                switch (tabSetting.TabType)
                {
                    case MyCommon.TabUsageType.Home:
                        tab = new HomeTabModel(tabSetting.TabName);
                        break;
                    case MyCommon.TabUsageType.Mentions:
                        tab = new MentionsTabModel(tabSetting.TabName);
                        break;
                    case MyCommon.TabUsageType.DirectMessage:
                        tab = new DirectMessagesTabModel(tabSetting.TabName);
                        break;
                    case MyCommon.TabUsageType.Favorites:
                        tab = new FavoritesTabModel(tabSetting.TabName);
                        break;
                    case MyCommon.TabUsageType.UserDefined:
                        tab = new FilterTabModel(tabSetting.TabName);
                        break;
                    case MyCommon.TabUsageType.UserTimeline:
                        tab = new UserTimelineTabModel(tabSetting.TabName, tabSetting.User);
                        break;
                    case MyCommon.TabUsageType.PublicSearch:
                        tab = new PublicSearchTabModel(tabSetting.TabName)
                        {
                            SearchWords = tabSetting.SearchWords,
                            SearchLang = tabSetting.SearchLang,
                        };
                        break;
                    case MyCommon.TabUsageType.Lists:
                        tab = new ListTimelineTabModel(tabSetting.TabName, tabSetting.ListInfo);
                        break;
                    case MyCommon.TabUsageType.Mute:
                        tab = new MuteTabModel(tabSetting.TabName);
                        break;
                    default:
                        continue;
                }

                tab.UnreadManage = tabSetting.UnreadManage;
                tab.Protected = tabSetting.Protected;
                tab.Notify = tabSetting.Notify;
                tab.SoundFile = tabSetting.SoundFile;

                if (tab.IsDistributableTabType)
                {
                    var filterTab = (FilterTabModel)tab;
                    filterTab.FilterArray = tabSetting.FilterArray;
                    filterTab.FilterModified = false;
                }

                if (this._statuses.ContainsTab(tab.TabName))
                    tab.TabName = this._statuses.MakeTabName("MyTab");

                this._statuses.AddTab(tab);
            }
            if (_statuses.Tabs.Count == 0)
            {
                _statuses.AddTab(new HomeTabModel());
                _statuses.AddTab(new MentionsTabModel());
                _statuses.AddTab(new DirectMessagesTabModel());
                _statuses.AddTab(new FavoritesTabModel());
            }
        }
Example #50
0
        public void SaveConfig(SettingCommon settingCommon)
        {
            switch (this.IconSize.SelectedIndex)
            {
                case 0:
                    settingCommon.IconSize = MyCommon.IconSizes.IconNone;
                    break;
                case 1:
                    settingCommon.IconSize = MyCommon.IconSizes.Icon16;
                    break;
                case 2:
                    settingCommon.IconSize = MyCommon.IconSizes.Icon24;
                    break;
                case 3:
                    settingCommon.IconSize = MyCommon.IconSizes.Icon48;
                    break;
                case 4:
                    settingCommon.IconSize = MyCommon.IconSizes.Icon48_2;
                    break;
            }

            settingCommon.OneWayLove = this.OneWayLv.Checked;
            settingCommon.SortOrderLock = this.CheckSortOrderLock.Checked;
            settingCommon.ViewTabBottom = this.CheckViewTabBottom.Checked;
            settingCommon.UseUnreadStyle = this.chkUnreadStyle.Checked;
            settingCommon.DateTimeFormat = this.CmbDateTimeFormat.Text;
            settingCommon.ShowGrid = this.CheckShowGrid.Checked;
            settingCommon.HideDuplicatedRetweets = this.HideDuplicatedRetweetsCheck.Checked;
            settingCommon.IsListsIncludeRts = this.IsListsIncludeRtsCheckBox.Checked;
        }
Example #51
0
        public void SaveConfig(SettingCommon settingCommon)
        {
            settingCommon.UserstreamStartup = this.StartupUserstreamCheck.Checked;
            settingCommon.PostAndGet = this.CheckPostAndGet.Checked;

            var arg = new IntervalChangedEventArgs();
            var isIntervalChanged = false;

            var userstreamPeriod = int.Parse(this.UserstreamPeriod.Text);
            if (settingCommon.UserstreamPeriod != userstreamPeriod)
            {
                settingCommon.UserstreamPeriod = userstreamPeriod;
                arg.UserStream = true;
                isIntervalChanged = true;
            }

            var timelinePeriod = int.Parse(this.TimelinePeriod.Text);
            if (settingCommon.TimelinePeriod != timelinePeriod)
            {
                settingCommon.TimelinePeriod = timelinePeriod;
                arg.Timeline = true;
                isIntervalChanged = true;
            }

            var dmPeriod = int.Parse(this.DMPeriod.Text);
            if (settingCommon.DMPeriod != dmPeriod)
            {
                settingCommon.DMPeriod = dmPeriod;
                arg.DirectMessage = true;
                isIntervalChanged = true;
            }

            var pubSearchPeriod = int.Parse(this.PubSearchPeriod.Text);
            if (settingCommon.PubSearchPeriod != pubSearchPeriod)
            {
                settingCommon.PubSearchPeriod = pubSearchPeriod;
                arg.PublicSearch = true;
                isIntervalChanged = true;
            }

            var listsPeriod = int.Parse(this.ListsPeriod.Text);
            if (settingCommon.ListsPeriod != listsPeriod)
            {
                settingCommon.ListsPeriod = listsPeriod;
                arg.Lists = true;
                isIntervalChanged = true;
            }

            var replyPeriod = int.Parse(this.ReplyPeriod.Text);
            if (settingCommon.ReplyPeriod != replyPeriod)
            {
                settingCommon.ReplyPeriod = replyPeriod;
                arg.Reply = true;
                isIntervalChanged = true;
            }

            var userTimelinePeriod = int.Parse(this.UserTimelinePeriod.Text);
            if (settingCommon.UserTimelinePeriod != userTimelinePeriod)
            {
                settingCommon.UserTimelinePeriod = userTimelinePeriod;
                arg.UserTimeline = true;
                isIntervalChanged = true;
            }

            if (isIntervalChanged && IntervalChanged != null)
                this.IntervalChanged(this, arg);
        }
Example #52
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            switch (settingCommon.NameBalloon)
            {
            case MyCommon.NameBalloonEnum.None:
                this.cmbNameBalloon.SelectedIndex = 0;
                break;

            case MyCommon.NameBalloonEnum.UserID:
                this.cmbNameBalloon.SelectedIndex = 1;
                break;

            case MyCommon.NameBalloonEnum.NickName:
                this.cmbNameBalloon.SelectedIndex = 2;
                break;
            }

            this.CheckDispUsername.Checked = settingCommon.DispUsername;

            switch (settingCommon.DispLatestPost)
            {
            case MyCommon.DispTitleEnum.None:
                this.ComboDispTitle.SelectedIndex = 0;
                break;

            case MyCommon.DispTitleEnum.Ver:
                this.ComboDispTitle.SelectedIndex = 1;
                break;

            case MyCommon.DispTitleEnum.Post:
                this.ComboDispTitle.SelectedIndex = 2;
                break;

            case MyCommon.DispTitleEnum.UnreadRepCount:
                this.ComboDispTitle.SelectedIndex = 3;
                break;

            case MyCommon.DispTitleEnum.UnreadAllCount:
                this.ComboDispTitle.SelectedIndex = 4;
                break;

            case MyCommon.DispTitleEnum.UnreadAllRepCount:
                this.ComboDispTitle.SelectedIndex = 5;
                break;

            case MyCommon.DispTitleEnum.UnreadCountAllCount:
                this.ComboDispTitle.SelectedIndex = 6;
                break;

            case MyCommon.DispTitleEnum.OwnStatus:
                this.ComboDispTitle.SelectedIndex = 7;
                break;
            }

            this.CheckAlwaysTop.Checked          = settingCommon.AlwaysTop;
            this.CheckBalloonLimit.Checked       = settingCommon.LimitBalloon;
            this.chkTabIconDisp.Checked          = settingCommon.TabIconDisp;
            this.CheckMonospace.Checked          = settingCommon.IsMonospace;
            this.CheckPreviewEnable.Checked      = settingCommon.PreviewEnable;
            this.CheckStatusAreaAtBottom.Checked = settingCommon.StatusAreaAtBottom;

            switch (settingCommon.ReplyIconState)
            {
            case MyCommon.REPLY_ICONSTATE.None:
                this.ReplyIconStateCombo.SelectedIndex = 0;
                break;

            case MyCommon.REPLY_ICONSTATE.StaticIcon:
                this.ReplyIconStateCombo.SelectedIndex = 1;
                break;

            case MyCommon.REPLY_ICONSTATE.BlinkIcon:
                this.ReplyIconStateCombo.SelectedIndex = 2;
                break;
            }

            switch (settingCommon.Language)
            {
            case "OS":
                this.LanguageCombo.SelectedIndex = 0;
                break;

            case "ja":
                this.LanguageCombo.SelectedIndex = 1;
                break;

            case "en":
                this.LanguageCombo.SelectedIndex = 2;
                break;

            case "zh-CN":
                this.LanguageCombo.SelectedIndex = 3;
                break;

            default:
                this.LanguageCombo.SelectedIndex = 0;
                break;
            }

            this.ChkNewMentionsBlink.Checked      = settingCommon.BlinkNewMentions;
            this.IsNotifyUseGrowlCheckBox.Checked = settingCommon.IsUseNotifyGrowl;
            this.IsNotifyUseGrowlCheckBox.Enabled = GrowlHelper.IsDllExists;
        }
Example #53
0
        public void SaveConfig(SettingCommon settingCommon)
        {
            switch (this.cmbNameBalloon.SelectedIndex)
            {
            case 0:
                settingCommon.NameBalloon = MyCommon.NameBalloonEnum.None;
                break;

            case 1:
                settingCommon.NameBalloon = MyCommon.NameBalloonEnum.UserID;
                break;

            case 2:
                settingCommon.NameBalloon = MyCommon.NameBalloonEnum.NickName;
                break;
            }

            settingCommon.DispUsername = this.CheckDispUsername.Checked;

            switch (this.ComboDispTitle.SelectedIndex)
            {
            case 0:     // None
                settingCommon.DispLatestPost = MyCommon.DispTitleEnum.None;
                break;

            case 1:     // Ver
                settingCommon.DispLatestPost = MyCommon.DispTitleEnum.Ver;
                break;

            case 2:     // Post
                settingCommon.DispLatestPost = MyCommon.DispTitleEnum.Post;
                break;

            case 3:     // RepCount
                settingCommon.DispLatestPost = MyCommon.DispTitleEnum.UnreadRepCount;
                break;

            case 4:     // AllCount
                settingCommon.DispLatestPost = MyCommon.DispTitleEnum.UnreadAllCount;
                break;

            case 5:     // Rep+All
                settingCommon.DispLatestPost = MyCommon.DispTitleEnum.UnreadAllRepCount;
                break;

            case 6:     // Unread/All
                settingCommon.DispLatestPost = MyCommon.DispTitleEnum.UnreadCountAllCount;
                break;

            case 7:     // Count of Status/Follow/Follower
                settingCommon.DispLatestPost = MyCommon.DispTitleEnum.OwnStatus;
                break;
            }

            settingCommon.AlwaysTop          = this.CheckAlwaysTop.Checked;
            settingCommon.LimitBalloon       = this.CheckBalloonLimit.Checked;
            settingCommon.TabIconDisp        = this.chkTabIconDisp.Checked;
            settingCommon.IsMonospace        = this.CheckMonospace.Checked;
            settingCommon.PreviewEnable      = this.CheckPreviewEnable.Checked;
            settingCommon.StatusAreaAtBottom = this.CheckStatusAreaAtBottom.Checked;

            switch (this.ReplyIconStateCombo.SelectedIndex)
            {
            case 0:
                settingCommon.ReplyIconState = MyCommon.REPLY_ICONSTATE.None;
                break;

            case 1:
                settingCommon.ReplyIconState = MyCommon.REPLY_ICONSTATE.StaticIcon;
                break;

            case 2:
                settingCommon.ReplyIconState = MyCommon.REPLY_ICONSTATE.BlinkIcon;
                break;
            }

            switch (this.LanguageCombo.SelectedIndex)
            {
            case 0:
                settingCommon.Language = "OS";
                break;

            case 1:
                settingCommon.Language = "ja";
                break;

            case 2:
                settingCommon.Language = "en";
                break;

            case 3:
                settingCommon.Language = "zh-CN";
                break;

            default:
                settingCommon.Language = "en";
                break;
            }

            settingCommon.BlinkNewMentions = this.ChkNewMentionsBlink.Checked;
            settingCommon.IsUseNotifyGrowl = this.IsNotifyUseGrowlCheckBox.Checked;
        }
Example #54
0
        public void SaveConfig(SettingCommon settingCommon)
        {
            settingCommon.UserstreamStartup = this.StartupUserstreamCheck.Checked;
            settingCommon.PostAndGet        = this.CheckPostAndGet.Checked;

            var arg = new IntervalChangedEventArgs();
            var isIntervalChanged = false;

            var userstreamPeriod = int.Parse(this.UserstreamPeriod.Text);

            if (settingCommon.UserstreamPeriod != userstreamPeriod)
            {
                settingCommon.UserstreamPeriod = userstreamPeriod;
                arg.UserStream    = true;
                isIntervalChanged = true;
            }

            var timelinePeriod = int.Parse(this.TimelinePeriod.Text);

            if (settingCommon.TimelinePeriod != timelinePeriod)
            {
                settingCommon.TimelinePeriod = timelinePeriod;
                arg.Timeline      = true;
                isIntervalChanged = true;
            }

            var dmPeriod = int.Parse(this.DMPeriod.Text);

            if (settingCommon.DMPeriod != dmPeriod)
            {
                settingCommon.DMPeriod = dmPeriod;
                arg.DirectMessage      = true;
                isIntervalChanged      = true;
            }

            var pubSearchPeriod = int.Parse(this.PubSearchPeriod.Text);

            if (settingCommon.PubSearchPeriod != pubSearchPeriod)
            {
                settingCommon.PubSearchPeriod = pubSearchPeriod;
                arg.PublicSearch  = true;
                isIntervalChanged = true;
            }

            var listsPeriod = int.Parse(this.ListsPeriod.Text);

            if (settingCommon.ListsPeriod != listsPeriod)
            {
                settingCommon.ListsPeriod = listsPeriod;
                arg.Lists         = true;
                isIntervalChanged = true;
            }

            var replyPeriod = int.Parse(this.ReplyPeriod.Text);

            if (settingCommon.ReplyPeriod != replyPeriod)
            {
                settingCommon.ReplyPeriod = replyPeriod;
                arg.Reply         = true;
                isIntervalChanged = true;
            }

            var userTimelinePeriod = int.Parse(this.UserTimelinePeriod.Text);

            if (settingCommon.UserTimelinePeriod != userTimelinePeriod)
            {
                settingCommon.UserTimelinePeriod = userTimelinePeriod;
                arg.UserTimeline  = true;
                isIntervalChanged = true;
            }

            if (isIntervalChanged)
            {
                this.IntervalChanged?.Invoke(this, arg);
            }
        }
Example #55
0
 public void LoadConfig(SettingCommon settingCommon)
 {
     this.ConnectionTimeOut.Text = settingCommon.DefaultTimeOut.ToString();
     this.TwitterAPIText.Text = settingCommon.TwitterUrl;
 }
Example #56
0
        public void SaveConfig(SettingCommon settingCommon, SettingLocal settingLocal)
        {
            this.BasedPanel.SaveConfig(settingCommon);
            this.GetPeriodPanel.SaveConfig(settingCommon);
            this.StartupPanel.SaveConfig(settingCommon);
            this.TweetPrvPanel.SaveConfig(settingCommon);
            this.TweetActPanel.SaveConfig(settingCommon, settingLocal);
            this.ActionPanel.SaveConfig(settingCommon, settingLocal);
            this.FontPanel.SaveConfig(settingLocal);
            this.FontPanel2.SaveConfig(settingLocal);
            this.PreviewPanel.SaveConfig(settingCommon);
            this.GetCountPanel.SaveConfig(settingCommon);
            this.ShortUrlPanel.SaveConfig(settingCommon);
            this.ProxyPanel.SaveConfig(settingLocal);
            this.CooperatePanel.SaveConfig(settingCommon);
            this.ConnectionPanel.SaveConfig(settingCommon);
            this.NotifyPanel.SaveConfig(settingCommon);

            var userAccountIdx = this.BasedPanel.AuthUserCombo.SelectedIndex;
            if (userAccountIdx != -1)
            {
                var u = settingCommon.UserAccounts[userAccountIdx];
                this.tw.Initialize(u.Token, u.TokenSecret, u.Username, u.UserId);
            }
            else
            {
                this.tw.ClearAuthInfo();
                this.tw.Initialize("", "", "", 0);
            }
        }
Example #57
0
        public void SaveConfig(SettingCommon settingCommon)
        {
            switch (this.cmbNameBalloon.SelectedIndex)
            {
                case 0:
                    settingCommon.NameBalloon = MyCommon.NameBalloonEnum.None;
                    break;
                case 1:
                    settingCommon.NameBalloon = MyCommon.NameBalloonEnum.UserID;
                    break;
                case 2:
                    settingCommon.NameBalloon = MyCommon.NameBalloonEnum.NickName;
                    break;
            }

            settingCommon.DispUsername = this.CheckDispUsername.Checked;

            switch (this.ComboDispTitle.SelectedIndex)
            {
                case 0: // None
                    settingCommon.DispLatestPost = MyCommon.DispTitleEnum.None;
                    break;
                case 1: // Ver
                    settingCommon.DispLatestPost = MyCommon.DispTitleEnum.Ver;
                    break;
                case 2: // Post
                    settingCommon.DispLatestPost = MyCommon.DispTitleEnum.Post;
                    break;
                case 3: // RepCount
                    settingCommon.DispLatestPost = MyCommon.DispTitleEnum.UnreadRepCount;
                    break;
                case 4: // AllCount
                    settingCommon.DispLatestPost = MyCommon.DispTitleEnum.UnreadAllCount;
                    break;
                case 5: // Rep+All
                    settingCommon.DispLatestPost = MyCommon.DispTitleEnum.UnreadAllRepCount;
                    break;
                case 6: // Unread/All
                    settingCommon.DispLatestPost = MyCommon.DispTitleEnum.UnreadCountAllCount;
                    break;
                case 7: // Count of Status/Follow/Follower
                    settingCommon.DispLatestPost = MyCommon.DispTitleEnum.OwnStatus;
                    break;
            }

            settingCommon.AlwaysTop = this.CheckAlwaysTop.Checked;
            settingCommon.LimitBalloon = this.CheckBalloonLimit.Checked;
            settingCommon.TabIconDisp = this.chkTabIconDisp.Checked;
            settingCommon.IsMonospace = this.CheckMonospace.Checked;
            settingCommon.PreviewEnable = this.CheckPreviewEnable.Checked;
            settingCommon.StatusAreaAtBottom = this.CheckStatusAreaAtBottom.Checked;

            switch (this.ReplyIconStateCombo.SelectedIndex)
            {
                case 0:
                    settingCommon.ReplyIconState = MyCommon.REPLY_ICONSTATE.None;
                    break;
                case 1:
                    settingCommon.ReplyIconState = MyCommon.REPLY_ICONSTATE.StaticIcon;
                    break;
                case 2:
                    settingCommon.ReplyIconState = MyCommon.REPLY_ICONSTATE.BlinkIcon;
                    break;
            }

            switch (this.LanguageCombo.SelectedIndex)
            {
                case 0:
                    settingCommon.Language = "OS";
                    break;
                case 1:
                    settingCommon.Language = "ja";
                    break;
                case 2:
                    settingCommon.Language = "en";
                    break;
                case 3:
                    settingCommon.Language = "zh-CN";
                    break;
                default:
                    settingCommon.Language = "en";
                    break;
            }

            settingCommon.BlinkNewMentions = this.ChkNewMentionsBlink.Checked;
            settingCommon.IsUseNotifyGrowl = this.IsNotifyUseGrowlCheckBox.Checked;
        }
Example #58
0
        public void LoadConfig(SettingCommon settingCommon)
        {
            switch (settingCommon.NameBalloon)
            {
                case MyCommon.NameBalloonEnum.None:
                    this.cmbNameBalloon.SelectedIndex = 0;
                    break;
                case MyCommon.NameBalloonEnum.UserID:
                    this.cmbNameBalloon.SelectedIndex = 1;
                    break;
                case MyCommon.NameBalloonEnum.NickName:
                    this.cmbNameBalloon.SelectedIndex = 2;
                    break;
            }

            this.CheckDispUsername.Checked = settingCommon.DispUsername;

            switch (settingCommon.DispLatestPost)
            {
                case MyCommon.DispTitleEnum.None:
                    this.ComboDispTitle.SelectedIndex = 0;
                    break;
                case MyCommon.DispTitleEnum.Ver:
                    this.ComboDispTitle.SelectedIndex = 1;
                    break;
                case MyCommon.DispTitleEnum.Post:
                    this.ComboDispTitle.SelectedIndex = 2;
                    break;
                case MyCommon.DispTitleEnum.UnreadRepCount:
                    this.ComboDispTitle.SelectedIndex = 3;
                    break;
                case MyCommon.DispTitleEnum.UnreadAllCount:
                    this.ComboDispTitle.SelectedIndex = 4;
                    break;
                case MyCommon.DispTitleEnum.UnreadAllRepCount:
                    this.ComboDispTitle.SelectedIndex = 5;
                    break;
                case MyCommon.DispTitleEnum.UnreadCountAllCount:
                    this.ComboDispTitle.SelectedIndex = 6;
                    break;
                case MyCommon.DispTitleEnum.OwnStatus:
                    this.ComboDispTitle.SelectedIndex = 7;
                    break;
            }

            this.CheckAlwaysTop.Checked = settingCommon.AlwaysTop;
            this.CheckBalloonLimit.Checked = settingCommon.LimitBalloon;
            this.chkTabIconDisp.Checked = settingCommon.TabIconDisp;
            this.CheckMonospace.Checked = settingCommon.IsMonospace;
            this.CheckPreviewEnable.Checked = settingCommon.PreviewEnable;
            this.CheckStatusAreaAtBottom.Checked = settingCommon.StatusAreaAtBottom;

            switch (settingCommon.ReplyIconState)
            {
                case MyCommon.REPLY_ICONSTATE.None:
                    this.ReplyIconStateCombo.SelectedIndex = 0;
                    break;
                case MyCommon.REPLY_ICONSTATE.StaticIcon:
                    this.ReplyIconStateCombo.SelectedIndex = 1;
                    break;
                case MyCommon.REPLY_ICONSTATE.BlinkIcon:
                    this.ReplyIconStateCombo.SelectedIndex = 2;
                    break;
            }

            switch (settingCommon.Language)
            {
                case "OS":
                    this.LanguageCombo.SelectedIndex = 0;
                    break;
                case "ja":
                    this.LanguageCombo.SelectedIndex = 1;
                    break;
                case "en":
                    this.LanguageCombo.SelectedIndex = 2;
                    break;
                case "zh-CN":
                    this.LanguageCombo.SelectedIndex = 3;
                    break;
                default:
                    this.LanguageCombo.SelectedIndex = 0;
                    break;
            }

            this.ChkNewMentionsBlink.Checked = settingCommon.BlinkNewMentions;
            this.IsNotifyUseGrowlCheckBox.Checked = settingCommon.IsUseNotifyGrowl;
            this.IsNotifyUseGrowlCheckBox.Enabled = GrowlHelper.IsDllExists;
        }
Example #59
0
 public void SaveConfig(SettingCommon settingCommon)
 {
     settingCommon.DefaultTimeOut = int.Parse(this.ConnectionTimeOut.Text);
     settingCommon.TwitterUrl = this.TwitterAPIText.Text.Trim();
 }
Example #60
0
        private void LoadConfig()
        {
            _cfgCommon = SettingCommon.Load();
            SettingCommon.Instance = this._cfgCommon;
            if (_cfgCommon.UserAccounts == null || _cfgCommon.UserAccounts.Count == 0)
            {
                _cfgCommon.UserAccounts = new List<UserAccount>();
                if (!string.IsNullOrEmpty(_cfgCommon.UserName))
                {
                    UserAccount account = new UserAccount();
                    account.Username = _cfgCommon.UserName;
                    account.UserId = _cfgCommon.UserId;
                    account.Token = _cfgCommon.Token;
                    account.TokenSecret = _cfgCommon.TokenSecret;

                    _cfgCommon.UserAccounts.Add(account);
                }
            }

            _cfgLocal = SettingLocal.Load();

            // v1.2.4 以前の設定には ScaleDimension の項目がないため、現在の DPI と同じとして扱う
            if (_cfgLocal.ScaleDimension.IsEmpty)
                _cfgLocal.ScaleDimension = this.CurrentAutoScaleDimensions;

            List<TabClass> tabs = SettingTabs.Load().Tabs;
            foreach (TabClass tb in tabs)
            {
                try
                {
                    tb.FilterModified = false;
                    _statuses.Tabs.Add(tb.TabName, tb);
                }
                catch (Exception)
                {
                    tb.TabName = _statuses.GetUniqueTabName();
                    _statuses.Tabs.Add(tb.TabName, tb);
                }
            }
            if (_statuses.Tabs.Count == 0)
            {
                _statuses.AddTab(MyCommon.DEFAULTTAB.RECENT, MyCommon.TabUsageType.Home, null);
                _statuses.AddTab(MyCommon.DEFAULTTAB.REPLY, MyCommon.TabUsageType.Mentions, null);
                _statuses.AddTab(MyCommon.DEFAULTTAB.DM, MyCommon.TabUsageType.DirectMessage, null);
                _statuses.AddTab(MyCommon.DEFAULTTAB.FAV, MyCommon.TabUsageType.Favorites, null);
            }
        }