本文整理汇总了C#中WindowBase类的典型用法代码示例。如果您正苦于以下问题:C# WindowBase类的具体用法?C# WindowBase怎么用?C# WindowBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WindowBase类属于命名空间,在下文中一共展示了WindowBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnMaterialsColorDragMouseDown
public static void OnMaterialsColorDragMouseDown(WindowBase sender, UIMouseEventArgs eventArgs)
{
try
{
CASCompositorController ths = CASCompositorController.sController;
if ((ths.mCurrentDesignObject != null) && (ths.mMaterialSkewerSelectedPattern != -1))
{
if (eventArgs.MouseKey == MouseKeys.kMouseRight)
{
bool random = ((eventArgs.Modifiers & (Modifiers.kModifierMaskShift | Modifiers.kModifierMaskControl)) != Modifiers.kModifierMaskNone);
ProcessAlterColor(random);
if (sender.Enabled)
{
eventArgs.Handled = true;
}
return;
}
}
ths.OnMaterialsColorDragMouseDown(sender, eventArgs);
}
catch (Exception e)
{
Common.Exception("OnMaterialsColorDragMouseDown", e);
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:29,代码来源:CASCompositorControllerEx.cs
示例2: Setup
internal override void Setup(WindowBase window) {
base.Setup(window);
for (int i = 0; i < this.subComponents.Count; ++i) this.subComponents[i].Setup(window);
}
开发者ID:MJunak,项目名称:Unity3d.UI.Windows,代码行数:7,代码来源:WindowObjectElement.cs
示例3: OnAcceptHousehold
private static void OnAcceptHousehold(WindowBase sender, UIButtonClickEventArgs eventArgs)
{
try
{
CASPuck ths = CASPuck.Instance;
Sims3.UI.Function f = null;
if (!ths.mUiBusy && !ths.mAttemptingToAddSim)
{
ths.mUiBusy = true;
if (f == null)
{
f = delegate
{
CASController.Singleton.SetCurrentState(CASState.Summary);
if (ths.ShowRequiredItemsDialogTask())
{
ths.AcceptHouseholdCallback();
}
else
{
ths.mUiBusy = false;
}
};
}
Simulator.AddObject(new Sims3.UI.OneShotFunctionTask(f));
}
eventArgs.Handled = true;
}
catch (Exception e)
{
Common.Exception("OnAcceptHousehold", e);
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:34,代码来源:CRAPJailBreak.cs
示例4: GetKey
public long GetKey(WindowBase window, ClipType clipType, int id) {
var key = (long)(((int)clipType << 16) | (id & 0xffff));
return key;
}
开发者ID:Cyberbanan,项目名称:Unity3d.UI.Windows,代码行数:7,代码来源:Source.cs
示例5: OnPlay
public override void OnPlay(WindowBase window, object tag, TransitionInputParameters parameters, WindowComponentBase root, bool forward, System.Action callback) {
var param = this.GetParams<Parameters>(parameters);
if (param == null || root == null) {
if (callback != null) callback();
return;
}
var duration = this.GetDuration(parameters, forward);
var result = param.GetResult(forward);
if (TweenerGlobal.instance != null) {
//TweenerGlobal.instance.removeTweens(tag);
TweenerGlobal.instance.addTweenAlpha(root.canvas, duration, result).ease(ME.Ease.GetByType(forward == true ? param.inEase : param.outEase)).onComplete((obj) => { if (callback != null) callback(); }).onCancel((obj) => { if (callback != null) callback(); }).tag(tag);
} else {
if (root.canvas != null) root.canvas.alpha = result;
if (callback != null) callback();
}
}
开发者ID:hxingchh,项目名称:Unity3d.UI.Windows,代码行数:26,代码来源:WindowAnimationTransitionAlpha.cs
示例6: GetSource
public AudioSource GetSource(WindowBase window, ClipType clipType, int id) {
#if UNITY_EDITOR
if (Application.isPlaying == false) {
return null;
}
#endif
var key = (window != null) ? (long)window.GetInstanceID() : (long)(((int)clipType << 16) | (id & 0xffff));
AudioSource value;
if (this.instances.TryGetValue(key, out value) == false) {
value = this.source.Spawn();
this.instances.Add(key, value);
}
List<AudioSource> valuesByType;
if (this.instancesByType.TryGetValue(clipType, out valuesByType) == false) {
this.instancesByType.Add(clipType, new List<AudioSource>() { value });
} else {
valuesByType.Add(value);
}
return value;
}
开发者ID:MJunak,项目名称:Unity3d.UI.Windows,代码行数:35,代码来源:AudioSource.cs
示例7: Play
public static void Play(WindowBase window, Source sourceInfo, ClipType clipType, int id) {
var source = sourceInfo.GetSource(window, clipType, id);
if (source == null) return;
if (id == 0) {
// Stop
Manager.Stop(window, sourceInfo, clipType, id);
return;
}
var state = Manager.currentData.GetState(clipType, id);
if (state == null) {
Manager.Stop(window, sourceInfo, clipType, id);
return;
}
Manager.Reset(source);
if (clipType == ClipType.Music) {
source.clip = state.clip;
source.Play();
} else if (clipType == ClipType.SFX) {
source.PlayOneShot(state.clip);
}
}
开发者ID:MJunak,项目名称:Unity3d.UI.Windows,代码行数:35,代码来源:AudioManager.cs
示例8: Play
public static void Play(WindowBase window, Source sourceInfo, ClipType clipType, int id, bool replaceOnEquals) {
if (clipType == ClipType.Music) {
var currentMusicId = sourceInfo.GetCurrentMusicId();
if (currentMusicId > 0) {
var equals = (currentMusicId == id);
if (equals == false || replaceOnEquals == true) {
// Stop
Manager.Stop(window, sourceInfo, clipType, currentMusicId);
} else if (equals == true) {
// Don't play anything
return;
}
}
}
var source = sourceInfo.GetSource(window, clipType, id);
if (source == null) return;
if (id == 0) {
// Stop
Manager.Stop(window, sourceInfo, clipType, id);
return;
}
var state = Manager.currentData.GetState(clipType, id);
if (state == null) {
Manager.Stop(window, sourceInfo, clipType, id);
return;
}
Manager.Reset(source);
sourceInfo.ApplyVolume(clipType, source);
if (clipType == ClipType.Music) {
source.clip = state.clip;
source.Play();
} else if (clipType == ClipType.SFX) {
source.PlayOneShot(state.clip);
}
}
开发者ID:Cyberbanan,项目名称:Unity3d.UI.Windows,代码行数:59,代码来源:Manager.cs
示例9: CreateKnownInfoToolTip
private static Tooltip CreateKnownInfoToolTip(Vector2 mousePosition, WindowBase parent, ref Vector2 tooltipPosition)
{
try
{
if (Sim.ActiveActor == null) return null;
NotificationManager manager = NotificationManager.Instance;
if (manager != null)
{
if ((manager.mNotifications[manager.mCurrentCategory].Count > manager.mCurrentNotification) && (manager.mCurrentNotification >= 0x0))
{
StyledNotification notice = manager.mNotifications[manager.mCurrentCategory][manager.mCurrentNotification] as StyledNotification;
if (notice != null)
{
if (notice.mNotificationWindow != null)
{
Sim sim = null;
if (notice.mNotificationWindow.GetChildByID(0x5, true) == parent)
{
if (notice.mIDOne != ObjectGuid.InvalidObjectGuid)
{
sim = GameObject.GetObject<Sim>(notice.mIDOne);
}
}
else
{
if (notice.mIDTwo != ObjectGuid.InvalidObjectGuid)
{
sim = GameObject.GetObject<Sim>(notice.mIDTwo);
}
}
if (sim != null)
{
IMiniSimDescription tag = sim.SimDescription;
if (tag != null)
{
IHudModel hudModel = Sims3.Gameplay.UI.Responder.Instance.HudModel;
Tooltip result = new KnownInfoTooltip(tag.FullName, hudModel.GetLTRRelationshipString(Sim.ActiveActor.SimDescription, tag), tag.HomeWorld, HudModelEx.GetKnownInfo(hudModel as HudModel, tag));
tooltipPosition = (tooltipPosition - (mousePosition - parent.Position)) + new Vector2(-result.TooltipWindow.Area.Width, parent.Area.Height);
return result;
}
}
}
}
}
}
}
catch (Exception e)
{
Common.Exception("CreateKnownInfoToolTip", e);
}
return null;
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:58,代码来源:SecondImage.cs
示例10: Awake
private void Awake()
{
if (Window == null)
Window = transform.parent.GetComponent<WindowBase>();
if (Window != null)
GetComponent<Button>().onClick.AddListener(delegate ()
{ WindowManager.Instance.Close(Window); });
}
开发者ID:GooKu,项目名称:UiModule,代码行数:9,代码来源:CloseWindowButton.cs
示例11: PresentReplacement
public void PresentReplacement(WindowBase replacee, DockStyle dock)
{
replacee.Hide();
Dock = dock;
Attach(replacee.Parent as WindowBase);
FormClosed += (s, e) =>
{
replacee.Show();
};
}
开发者ID:JackWangCUMT,项目名称:KUI,代码行数:10,代码来源:FlatFrame.cs
示例12: SetOutState
public void SetOutState(List<TransitionInputParameters> parameters, WindowBase window, WindowComponentBase root) {
var i = 0;
foreach (var transition in this.transitions) {
transition.SetOutState(parameters[i++], window, root);
}
}
开发者ID:ly774508966,项目名称:Unity3d.UI.Windows,代码行数:10,代码来源:WindowAnimationBase.cs
示例13: OnCASClick
public static void OnCASClick(WindowBase sender, UIButtonClickEventArgs eventArgs)
{
try
{
Common.FunctionTask.Perform(GotoCASMode);
}
catch (Exception e)
{
Common.Exception("OnCASClick", e);
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:11,代码来源:EditTownLibraryPanelEx.cs
示例14: OnClickGenealogy
protected static void OnClickGenealogy(WindowBase sender, UIButtonClickEventArgs eventArgs)
{
try
{
Common.FunctionTask.Perform(ShowFamilyTreeDialog);
}
catch (Exception e)
{
Common.Exception("OnClickGenealogy", e);
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:11,代码来源:FamilyTree.cs
示例15: Show
public static FlowGameViewRenderWindow Show(WindowBase previewScreen) {
var window = FlowGameViewRenderWindow.CreateInstance<FlowGameViewRenderWindow>();
window.previewScreen = previewScreen;
window.ShowPopup();
window.SetRenderSize(Screen.width, Screen.height, Screen.dpi);
return window;
}
开发者ID:Cyberbanan,项目名称:Unity3d.UI.Windows,代码行数:11,代码来源:FlowGameViewWindow.cs
示例16: CheckMismatch
private bool CheckMismatch(WindowBase window, List<TransitionInputParameters> parameters) {
if (this.transitions.Count != parameters.Count) {
Debug.LogError("Animation: Parameters mismatch Transition [Window " + window.gameObject.name + "] ", this);
return false;
}
return true;
}
开发者ID:RuFengLau,项目名称:Unity3d.UI.Windows,代码行数:12,代码来源:WindowAnimationBase.cs
示例17: Attach
public void Attach(WindowBase parent)
{
ResizeRedraw = true;
TopLevel = false;
parent.Controls.Add(this);
Parent = parent;
PerformLayout();
//Animate();
(this as Control).Show();
(this as Control).BringToFront();
(this as Control).Parent.Invalidate(ShadeRect(Theme.ShadowSize), false);
}
开发者ID:JackWangCUMT,项目名称:KUI,代码行数:13,代码来源:FlatFrame.cs
示例18: OnSwitchToClick
public static void OnSwitchToClick(WindowBase w, UIButtonClickEventArgs eventArgs)
{
try
{
eventArgs.Handled = true;
Common.FunctionTask.Perform(SwitchToClick);
}
catch (Exception e)
{
Common.Exception("OnSwitchToClick", e);
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:13,代码来源:EditTownInfoPanelEx.cs
示例19: OnRandomizeNameClick
public static void OnRandomizeNameClick(WindowBase sender, UIButtonClickEventArgs eventArgs)
{
try
{
CASRequiredItemsDialog dialog = CASRequiredItemsDialog.sDialog;
if (dialog != null)
{
dialog.OnRandomizeNameClick(sender, eventArgs);
}
}
catch (Exception e)
{
Common.Exception("OnRandomizeNameClick", e);
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:15,代码来源:CASRequiredItemsDialogEx.cs
示例20: SetInState
public void SetInState(List<TransitionInputParameters> parameters, WindowBase window, WindowComponentBase root) {
if (this.CheckMismatch(window, parameters) == false) {
return;
}
var i = 0;
foreach (var transition in this.transitions) {
transition.SetInState(parameters[i++], window, root);
}
}
开发者ID:RuFengLau,项目名称:Unity3d.UI.Windows,代码行数:16,代码来源:WindowAnimationBase.cs
注:本文中的WindowBase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论