public WMain(string picFile) { System.Windows.Forms.Application.EnableVisualStyles(); InitializeComponent(); var ver = Assembly.GetEntryAssembly().GetName().Version; Title = $"{Title} {ver.Major}.{ver.Minor}"; ACore = new AppCore {WbThumbs = WbThumbs, WMain = this}; Application.Current.Properties[nameof(AppProps.AppCore)] = ACore; ACore.InitBase(); MainStatusBar.DataContext = ACore.AppInfo; WbThumbs.ObjectForScripting = new ScriptManager(ACore); WbThumbs.DocumentCompleted += WbThumbs_DocumentCompleted; Stream stream = null; try { stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("PictureManager.html.Thumbs.html"); if (stream != null) using (StreamReader reader = new StreamReader(stream)) { stream = null; WbThumbs.DocumentText = reader.ReadToEnd(); } } finally { stream?.Dispose(); } _wFullPic = new WFullPic(); _argPicFile = picFile; }
public WCatalog(AppCore appCore) { InitializeComponent(); _aCore = appCore; Folders = new ViewModel.Folders { Title = "Folders", IconName = "appbar_folder" }; FoldersRoot = new ObservableCollection<ViewModel.BaseTreeViewItem> { Folders }; LoadFolders(); Folders.IsExpanded = true; TvFolders.Focus(); TvFolders.ItemsSource = FoldersRoot; }
public WFullPic() { InitializeComponent(); ACore = (AppCore) Application.Current.Properties[nameof(AppProps.AppCore)]; WbFullPic.ObjectForScripting = new ScriptManager(ACore); WbFullPic.DocumentCompleted += WbFullPicOnDocumentCompleted; Stream stream = null; try { stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("PictureManager.html.FullPic.html"); if (stream != null) using (StreamReader reader = new StreamReader(stream)) { stream = null; WbFullPic.DocumentText = reader.ReadToEnd(); } } finally { stream?.Dispose(); } WbFullPic.Focus(); }
public ScriptManager(AppCore appCore) { ACore = appCore; }
public WCompress(AppCore appCore) { InitializeComponent(); _appCore = appCore; JpegQualityLevel = Properties.Settings.Default.JpegQualityLevel; }