Beispiel #1
0
        public WordScapeWindow()
        {
            InitializeComponent();
            this.DataContext        = this;
            this.Width              = Properties.Settings.Default.WindowSize.Width;
            this.Height             = Properties.Settings.Default.WindowSize.Height;
            this.Top                = Properties.Settings.Default.WindowPos.Y;
            this.Left               = Properties.Settings.Default.WindowPos.X;
            this.LenTargetWord      = Properties.Settings.Default.WordLen;
            this.MinSubWordLength   = Properties.Settings.Default.SubWordLen;
            WordScapeWindowInstance = this;
            _Random = new Random(
#if DEBUG
                //1
#endif
                );
            this.Closing += (o, ec) =>
            {
                _timer?.Stop();
                Properties.Settings.Default.WindowPos  = new System.Drawing.Point((int)this.Left, (int)this.Top);
                Properties.Settings.Default.WindowSize = new System.Drawing.Size((int)this.Width, (int)this.Height);
                Properties.Settings.Default.WordLen    = this.LenTargetWord;
                Properties.Settings.Default.SubWordLen = this.MinSubWordLength;
                Properties.Settings.Default.Save();
            };
            this.Loaded += MainWindow_Loaded;
        }
Beispiel #2
0
 public void LetterWheelInit(WordScapeWindow wordScapeWindow, WordContainer wordCont, GenGrid gridgen)
 {
     this.wordScapeWindow = wordScapeWindow;
     this._wordCont       = wordCont;
     this.gridgen         = gridgen;
     this.CreateCircle();
     wordScapeWindow.NumWordsFound = 0;
     _lstFoundWordsSoFar.Clear();
 }