本文整理汇总了C#中WindowType类的典型用法代码示例。如果您正苦于以下问题:C# WindowType类的具体用法?C# WindowType怎么用?C# WindowType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WindowType类属于命名空间,在下文中一共展示了WindowType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IceTabPageDCCFile
public IceTabPageDCCFile(WindowType windowType, string sCaption)
: base(windowType, sCaption)
{
InitializeComponent();
dccFiles = new List<DccFileStruct>();
}
示例2: CustomShortcut
internal CustomShortcut(
string shortcutName,
string targetPath,
string targetArguments,
CustomShortcutType shortcutType,
WindowType windowType,
string shortcutRootFolder,
string basicIconToUse = null,
string workingFolder = null
)
{
var vbsFolderPath =
DirectoryUtils.GetUniqueDirName(CustomShortcutGetters.CustomShortcutVbsPath + shortcutName) + "\\";
var shortcutPath = $"{shortcutRootFolder}{new DirectoryInfo(vbsFolderPath).Name}\\{shortcutName}.lnk";
ShortcutName = shortcutName.CleanInvalidFilenameChars();
ShortcutItem = new ShortcutItem(shortcutPath);
TargetPath = targetPath;
TargetArguments = targetArguments;
ShortcutType = shortcutType;
VbsFolderPath = vbsFolderPath;
WorkingFolder = workingFolder;
WindowType = windowType;
Directory.CreateDirectory(VbsFolderPath);
if (basicIconToUse != null && File.Exists(basicIconToUse)) BasicShortcutIcon = basicIconToUse;
}
示例3: DropDownBoxListWindow
public DropDownBoxListWindow (IListDataProvider provider, WindowType windowType) : base (windowType)
{
this.DataProvider = provider;
this.TransientFor = IdeApp.Workbench.RootWindow;
this.TypeHint = Gdk.WindowTypeHint.Menu;
this.Decorated = false;
this.BorderWidth = 1;
list = new ListWidget (this);
list.SelectItem += delegate {
var sel = list.Selection;
if (sel >= 0 && sel < DataProvider.IconCount) {
DataProvider.ActivateItem (sel);
Destroy ();
}
};
SetSizeRequest (list.WidthRequest, list.HeightRequest);
vScrollbar = new ScrolledWindow ();
vScrollbar.VScrollbar.SizeAllocated += (o, args) => {
var minWidth = list.WidthRequest + args.Allocation.Width;
if (this.Allocation.Width < minWidth)
SetSizeRequest (minWidth, list.HeightRequest);
};
vScrollbar.Child = list;
var vbox = new VBox ();
vbox.PackStart (vScrollbar, true, true, 0);
Add (vbox);
}
示例4: Window
public Window(WindowType window_type)
: base(window_type)
{
_context = SynchronizationContext.Current;
CommunicationHandler.addReceiver(this);
this.SetIconFromFile("masgau.ico");
}
示例5: GetCurrentMediaItem
public static bool GetCurrentMediaItem(out MediaItem currentMediaItem, WindowType windowType)
{
currentMediaItem = new MediaItem();
switch (windowType)
{
case WindowType.Movie:
return GetMovieMediaItem(ref currentMediaItem);
case WindowType.Show:
return GetShowMediaItem(ref currentMediaItem);
case WindowType.Season:
return GetSeasonMediaItem(ref currentMediaItem);
case WindowType.Episode:
return GetEpisodeMediaItem(ref currentMediaItem);
case WindowType.List:
return GetListMediaItem(ref currentMediaItem);
}
return false;
}
示例6: SaveFile
public void SaveFile(String FilePath, String mainFolder)
{
if(Directory.Exists(mainFolder))
{
if(File.Exists(FilePath) || Directory.Exists(FilePath))
{
WindowOpen = true;
WinType = WindowType.Save;
DragStat.Dragging = false; // Ensure nothing is being draged.
FileToSave = FilePath;
MainFolder = mainFolder; // example: Application.dataPath/Saves;
GetAllSubDirectoriesAndFiles( MainFolder );
AddWidth();
AddScrollPosition(0);
AddPath(MainFolder, 0);
}
else Debug.LogError("I need a path for a temporary save file that actually exists!");
}
else
{
if(File.Exists(mainFolder)) Debug.LogError("I need a main directory, not a file!");
else Debug.LogError("I need a path for a main directory that actually exists!");
}
}
示例7: ShowWindow
/// <summary>
/// Displays content in a window
/// </summary>
/// <param name="windowTitle">Title text shown in window</param>
/// <param name="windowContents">Contents of the window</param>
/// <param name="isModal">Determines wheter the window is modal or not</param>
/// <param name="onClosingHandler">Event handler invoked when window is closing, and can be handled to cancel window closure</param>
/// <param name="windowType">The type of the window</param>
/// <param name="onClosedHandler">Event handler invoked when window is closed</param>
/// <param name="top">The distance from the top of the application at which to position the window</param>
/// <param name="left">The distance from the left of the application at which to position the window</param>
/// <returns>The window</returns>
public object ShowWindow(string windowTitle, FrameworkElement windowContents, bool isModal = false,
EventHandler<CancelEventArgs> onClosingHandler = null, EventHandler onClosedHandler = null,
WindowType windowType = WindowType.Floating, double? top = null, double? left = null)
{
if (windowContents == null)
throw new ArgumentNullException("windowContents");
int hashCode = windowContents.GetHashCode();
FloatingWindow floatingWindow = null;
if (!m_FloatingWindows.TryGetValue(hashCode, out floatingWindow))
{
// not existing yet
floatingWindow = new FloatingWindow()
{
Title = windowTitle ?? string.Empty,
};
switch (windowType)
{
case WindowType.Floating:
if (FloatingWindowStyle != null)
floatingWindow.Style = FloatingWindowStyle;
break;
case WindowType.DesignTimeFloating:
if (DesignTimeWindowStyle != null)
floatingWindow.Style = DesignTimeWindowStyle;
else if (FloatingWindowStyle != null) // fallback to FloatingWindowStyle
floatingWindow.Style = FloatingWindowStyle;
break;
}
floatingWindow.Closed += (o, e) =>
{
if (onClosedHandler != null)
onClosedHandler.Invoke(o, e);
m_FloatingWindows.Remove(hashCode);
if (floatingWindow != null)
floatingWindow.Content = null;
};
if (onClosingHandler != null)
floatingWindow.Closing += onClosingHandler;
floatingWindow.Content = windowContents;
m_FloatingWindows.Add(hashCode, floatingWindow);
}
if (top != null)
floatingWindow.VerticalOffset = (double)top;
if (left != null)
floatingWindow.HorizontalOffset = (double)left;
floatingWindow.Show(isModal);
return floatingWindow;
}
示例8: IceTabPageDCCFile
public IceTabPageDCCFile(WindowType windowType, string sCaption, FormMain parent)
: base(windowType, sCaption, parent)
{
InitializeComponent();
this._parent = parent;
dccFiles = new List<DccFileStruct>();
}
示例9: OpenBugGUI
public void OpenBugGUI()
{
_windowType = WindowType.BugWindow;
_popUpError = true;
if (GuiAllowScreenshot)
_takeScreenshot = true;
}
示例10: MakeLowPassKernel
public static float[] MakeLowPassKernel(double sampleRate, int filterOrder, double cutoffFrequency, WindowType windowType)
{
filterOrder |= 1;
float[] numArray = FilterBuilder.MakeSinc(sampleRate, cutoffFrequency, filterOrder);
float[] window = FilterBuilder.MakeWindow(windowType, filterOrder);
FilterBuilder.ApplyWindow(numArray, window);
FilterBuilder.Normalize(numArray);
return numArray;
}
示例11: Apply
/**
* Returns window value for a given window type, size and position.
*
* Window is first looked up in cache. If it doesn't exist,
* it is generated. The cached value is then returned.
*
* @param type window function type
* @param n sample position in the window
* @param N window length
* @return window value for n-th sample
*/
public static double Apply(WindowType type, int n, int N)
{
KeyValuePair<WindowType, int> key = new KeyValuePair<WindowType, int>(type, N);
if (!windowsCache.ContainsKey(key))
CreateWindow(key);
return windowsCache[key][n];
}
示例12: Window
public Window(Context ctx, WindowType type = WindowType.SCREEN_APPLICATION_WINDOW)
{
_context = ctx;
if (type == WindowType.SCREEN_APPLICATION_WINDOW)
this.CreateWindow();
else
this.CreateWindowType(type);
}
示例13: RacerDetails
private RacerDetails(WindowType type)
{
InitializeComponent();
_type = type;
foreach(string rClass in DataManager.Settings.Classes)
{
cboClass.Items.Add(rClass);
}
}
示例14: MakeBandPassKernel
public static float[] MakeBandPassKernel(double sampleRate, int filterOrder, double cutoff1, double cutoff2, WindowType windowType)
{
double cutoffFrequency = (cutoff2 - cutoff1) / 2.0;
double num1 = 2.0 * Math.PI * (cutoff2 - cutoffFrequency) / sampleRate;
float[] numArray = FilterBuilder.MakeLowPassKernel(sampleRate, filterOrder, cutoffFrequency, windowType);
for (int index = 0; index < numArray.Length; ++index)
{
int num2 = index - filterOrder / 2;
numArray[index] *= (float) (2.0 * Math.Cos(num1 * (double) num2));
}
return numArray;
}
示例15: Window
public Window(int width, int height, string title, WindowType type, int display, bool visible)
{
NativeWindow = new NativeWindow(width, height, title, GameWindowFlags.Default, GraphicsMode.Default, DisplayDevice.GetDisplay((DisplayIndex)display));
NativeWindow.Closing += WindowClosing;
NativeWindow.Resize += WindowResize;
Keyboard = new Keyboard(this);
Mouse = new Mouse(this);
Type = type;
Visible = visible;
}