Esempio n. 1
0
        private void OnRootProperties(object sender, ShellMenuInvokeEventArgs e)
        {
            var ctx = ShellContext.Current.Clone();

            TaskUtilities.EnsureSTAThreadTask(() =>
            {
                // find the top view window handle
                var viewHandle = Core.WindowsShell.View.GetOwnerViewHandle(e.HwndOwner);
                using (var form = new RootProperties())
                {
                    form.MemoryCacheCleared += (s, e2) =>
                    {
                        WebApi.ClearCache();
                    };
                    // use native proxy's 32x32 icon
                    form.Icon           = FolderServer.NativeProxy.Icons.FirstOrDefault(i => i.Height == 32).ToIcon();
                    form.SelectedObject = WebApi.ServerInfo;
                    WindowsUtilities.RunForm(form, viewHandle);
                }
            });
        }
Esempio n. 2
0
 protected override void OnRefresh(object sender, EventArgs e) => WebApi.ClearCache();