Beispiel #1
0
        private void FormThumbnailView_Closing(object sender, CancelEventArgs e)
        {
            ImageViewApplicationSettings appSettings = _applicationSettingsService.Settings;

            appSettings.ThumbnailFormLocation = PointDataModel.CreateFromPoint(Location);
            appSettings.ThumbnailFormSize     = SizeDataModel.CreateFromSize(Size);
            _applicationSettingsService.SaveSettings();
            Controls.Clear();
        }
Beispiel #2
0
        public void CompareSizeDataModel()
        {
            SizeDataModel model                 = new SizeDataModel(100, 150);
            SizeDataModel model2Compare         = new SizeDataModel(100, 150);
            SizeDataModel model2CompareNotEqual = new SizeDataModel(110, 170);

            DataContractComparer <SizeDataModel> sizeComparer = new DataContractComparer <SizeDataModel>(model);

            bool isEqual = sizeComparer.Equals(model2Compare);

            Assert.IsTrue(isEqual, "Compare failed to set objects matching");
        }