Пример #1
0
        private async Task OnSettingsWindowSizeChange(PointDValueChangeEventArgs ea)
        {
            await this.UIThreadAsync(() =>
            {
                System.Drawing.PointD winSize = new System.Drawing.PointD(this.Width, this.Height);

                var UIModel = ((TataruUIModel)ea.Sender);

                if (UIModel.IsFirstTime == 0)
                {
                    UIModel.IsFirstTime = -1;

                    double left = _ChatWindow.Left + _ChatWindow.ActualWidth;
                    this.Left   = left;
                    this.Top    = _ChatWindow.Top;
                }

                if (ea.NewValue != winSize)
                {
                    if (ea.NewValue.X > 1 && ea.NewValue.Y > 1)
                    {
                        this.Width  = ea.NewValue.X;
                        this.Height = ea.NewValue.Y;
                    }
                    else
                    {
                        UIModel.SettingsWindowSize = winSize;
                    }
                }
            });
        }
Пример #2
0
        private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            System.Drawing.PointD winSize = new System.Drawing.PointD(this.Width, this.Height);

            if (_TataruUIModel.SettingsWindowSize != winSize)
            {
                _TataruUIModel.SettingsWindowSize = winSize;
            }
        }
Пример #3
0
        public UserSettings()
        {
            BackgroundColor = (Color)ColorConverter.ConvertFromString("#4B000000");

            Font1Color = (Color)ColorConverter.ConvertFromString("#FFFFFFFF");

            Font2Color = (Color)ColorConverter.ConvertFromString("#FFFFFFFF");

            IsClickThrough = false;

            IsAlwaysOnTop = true;

            IsHideToTray = false;

            IsAutoHide = false;

            IsDirecMemoryReading = true;

            AutoHideTimeout = new TimeSpan(0, 5, 0);

            FontSize = 14;

            RecentBackgroundColors = new List <Color>(new Color[] { (Color)ColorConverter.ConvertFromString("#4B000000") });

            LineBreakHeight = 0;

            InsertSpaceCount = 0;

            CurrentTranslationEngine = 0;

            CurrentFFXIVLanguage = "English";

            CurrentTranslateToLanguage = "English";

            CurentUILanguague = (int)LanguagueWrapper.Languages.English;

            SettingsWindowSize = new System.Drawing.PointD(0.0, 0.0);

            ChatWindowLocation = new System.Drawing.RectangleD(0.0, 0.0, 0.0, 0.0);

            ShowHideChatKeys     = new HotKeyCombination("ShowHideChatWin");
            ClickThoughtChatKeys = new HotKeyCombination("ClickThoughtChatWin");
            ClearChatKeys        = new HotKeyCombination("ClearChatWin");

            ChatCodes = new Dictionary <string, ChatMsgType>()
            {
                { "003D", new ChatMsgType("003D", MsgType.Translate, "NPCD", (Color)ColorConverter.ConvertFromString("#FFABD647")) },
                { "0044", new ChatMsgType("0044", MsgType.Translate, "NPCA", (Color)ColorConverter.ConvertFromString("#FFABD647")) },
            };

            //ChatWindows = new List<ChatWindowViewModelSettings>(new ChatWindowViewModelSettings[] { new ChatWindowViewModelSettings() });

            ChatWindows = new List <ChatWindowViewModelSettings>();

            IsFirstTime = 0;
        }