本文整理汇总了C#中FALibrary类的典型用法代码示例。如果您正苦于以下问题:C# FALibrary类的具体用法?C# FALibrary怎么用?C# FALibrary使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FALibrary类属于命名空间,在下文中一共展示了FALibrary类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterSequence
public override void RegisterSequence(FALibrary.Sequence.FASequenceManager aSequenceManager)
{
base.RegisterSequence(aSequenceManager);
Initialize = new FASequence(aSequenceManager);
TransferBox = new FASequence(aSequenceManager);
ReleaseLabel = new FASequence(aSequenceManager);
}
示例2: SetSequenceManager
public void SetSequenceManager(FALibrary.Sequence.FASequenceManager mainSequenceManager,
FALibrary.Sequence.FASequenceManager subSequenceManager)
{
MainSequenceManager = mainSequenceManager;
SubSequenceManager = subSequenceManager;
CreatePart();
CreateModule();
}
示例3: RegisterSequence
public override void RegisterSequence(FALibrary.Sequence.FASequenceManager aSequenceManager)
{
Initialize = new FASequence(aSequenceManager);
MoveToStackerPos = new FASequence(aSequenceManager);
MoveToStackerPos.Name = "TrayUnloader.MoveToStackerPos";
PushToStacker = new FASequence(aSequenceManager);
PushToStacker.Name = "TrayUnloader.PushToStacker";
}
示例4: LanguageChangedEventHandler
private void LanguageChangedEventHandler(object sender, FALibrary.FAGenericEventArgs<string> e)
{
Dispatcher.Invoke(
new Action(
delegate()
{
treeView1.ItemsSource = null;
treeView1.ItemsSource = Manager.StringResourceManager.Instance.Resource.PropertyList;
}));
}
示例5: MakeSequence
private void MakeSequence(FAMMCPosition position, FAPartAction action, FALibrary.Utility.FATime time, string alarmPropertyName)
{
PositionUtility obj = new PositionUtility();
obj.Part = this;
obj.Position = position;
obj.PartAction = action;
obj.Timeout = time;
obj.AlarmPropertyName = alarmPropertyName;
obj.Initialize();
}
示例6: SetDevice
public override void SetDevice(FALibrary.Device.FADevice aDevice)
{
base.SetDevice(aDevice);
Device.UseEOFString = true;
Device.EOFString = "<EOF>";
//Device.OnException +=
// delegate(object sender, FAGenericEventArgs<string> e)
// {
// Manager.LogManager.Instance.WriteSystemLog(e.ToString());
// };
}
示例7: EventHandlerUserChanged
private void EventHandlerUserChanged(object sender, FALibrary.FAGenericEventArgs<Equipment.StandardEquipment.UserPermission> e)
{
Equipment.MainEquipment mainEquip = Equipment.EquipmentManager.Instance.MainEquip;
if (e.Value == Equipment.StandardEquipment.UserPermission.RCS)
{
buttonStart.IsEnabled = true;
}
else
{
buttonStart.IsEnabled = false;
buttonInitialize.IsEnabled = false;
}
}
示例8: UserChangedEventHandler
public void UserChangedEventHandler(object sender, FALibrary.FAGenericEventArgs<Equipment.StandardEquipment.UserPermission> e)
{
if (e.Value == Equipment.StandardEquipment.UserPermission.MASTER)
{
labelRankingData.Visibility = System.Windows.Visibility.Visible;
checkBoxRankingData.Visibility = System.Windows.Visibility.Visible;
checkBoxRankingData.IsChecked = true;
}
else
{
labelRankingData.Visibility = System.Windows.Visibility.Hidden;
checkBoxRankingData.Visibility = System.Windows.Visibility.Hidden;
checkBoxRankingData.IsChecked = true;
}
}
示例9: EventHandlerUserChanged
public void EventHandlerUserChanged(object sender, FALibrary.FAGenericEventArgs<Equipment.StandardEquipment.UserPermission> e)
{
Equipment.MainEquipment mainEquip = Equipment.EquipmentManager.Instance.MainEquip;
if (e.Value == Equipment.StandardEquipment.UserPermission.MASTER ||
e.Value == Equipment.StandardEquipment.UserPermission.MAINTENANCE)
{
EnabledModify = true;
}
else
{
EnableSelectJob(false);
EnabledModify = false;
}
}
示例10: EventHandlerUserChanged
public void EventHandlerUserChanged(object sender, FALibrary.FAGenericEventArgs<Equipment.StandardEquipment.UserPermission> e)
{
Equipment.MainEquipment mainEquip = Equipment.EquipmentManager.Instance.MainEquip;
if (e.Value == Equipment.StandardEquipment.UserPermission.RCS)
{
Binding bd = new Binding();
bd.Source = null;
labelStatus.SetBinding(Label.ContentProperty, bd);
labelStatus.Content = "RCS MODE";
}
else
{
BindingUtility.SetBindingObject(labelStatus, BindingMode.OneWay, mainEquip, Label.ContentProperty, "StatusString");
}
}
示例11: EventHandlerStatusChanged
private void EventHandlerStatusChanged(object sender, FALibrary.FAGenericEventArgs<Equipment.EquipmentStatus> e)
{
Equipment.MainEquipment mainEquip = Equipment.EquipmentManager.Instance.MainEquip;
if (mainEquip.Status == Equipment.EquipmentStatus.AUTO_STOP ||
mainEquip.Status == Equipment.EquipmentStatus.NONE)
{
//_loadingBypass.IsEnabled = true;
//_bandingBypass.IsEnabled = true;
}
else
{
if (mainEquip.Status == Equipment.EquipmentStatus.AUTO_RUNNING)
{
//_loadingBypass.IsEnabled = false;
//_bandingBypass.IsEnabled = false;
}
}
}
示例12: GenericPartStatus
public GenericPartStatus(FALibrary.Part.MemoryBasePart.FAPartMemoryBaseGeneric part, string onName, string offName, string unknownName = "UNKNOWN")
{
Part = part;
OnDisplayName = onName;
OffDisplayName = offName;
UnknownDisplayName = unknownName;
Execute =
delegate()
{
if (Part.IsTurnOn())
{
Status = OnDisplayName;
}
else if (Part.IsTurnOff())
{
Status = OffDisplayName;
}
else
{
Status = UnknownDisplayName;
}
};
}
示例13: CreatePartOutputIOList
private Grid CreatePartOutputIOList(FALibrary.Part.FAPart part)
{
if (part == null)
return new Grid();
if (part.GetType().GetProperty("OutputIO") == null)
return new Grid();
object obj = part.GetType().GetProperty("OutputIO").GetValue(part, null);
if (obj == null)
return new Grid();
try
{
List<FALibrary.Part.MemoryBasePart.FAPartOutputIOInfo> outputIO
= (List<FALibrary.Part.MemoryBasePart.FAPartOutputIOInfo>)obj;
return CreatePartIOList(outputIO);
}
catch
{
return new Grid();
}
}
示例14: CreateOnOffStopIndependentOperationInfo
private void CreateOnOffStopIndependentOperationInfo(Grid grid, FALibrary.Part.FAPart part, string name, Action<object> OnAction, Action<object> OffAction, Action<object> StopAction, Func<bool> IsOn, Func<bool> IsOff, string onName, string offName)
{
GeneralOperationInfo obj = new GeneralOperationInfo();
RowDefinition rd = new RowDefinition();
rd.Height = new GridLength(100, GridUnitType.Auto);
rd.MinHeight = 100;
grid.RowDefinitions.Add(rd);
SetOperationGridColor(grid, grid.RowDefinitions.Count - 1);
obj.Name = name;
obj.On = OnAction;
obj.Off = OffAction;
obj.StatusOnName = onName;
obj.StatusOffName = offName;
obj.IsOn = IsOn;
obj.IsOff = IsOff;
Label labelName = new Label();
labelName.Height = Double.NaN;
labelName.Width = Double.NaN;
labelName.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch;
labelName.VerticalContentAlignment = System.Windows.VerticalAlignment.Stretch;
labelName.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
labelName.VerticalContentAlignment = System.Windows.VerticalAlignment.Center;
labelName.Margin = new Thickness(2);
Binding bd = new Binding("Name");
bd.Source = obj;
bd.Mode = BindingMode.OneWay;
labelName.SetBinding(Label.ContentProperty, bd);
Label labelStatus = new Label();
labelStatus.Height = Double.NaN;
labelStatus.Width = Double.NaN;
labelStatus.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch;
labelStatus.VerticalContentAlignment = System.Windows.VerticalAlignment.Stretch;
labelStatus.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
labelStatus.VerticalContentAlignment = System.Windows.VerticalAlignment.Center;
labelStatus.Margin = new Thickness(2);
bd = new Binding("Status");
bd.Source = obj;
bd.Mode = BindingMode.OneWay;
labelStatus.SetBinding(Label.ContentProperty, bd);
Grid gridInputIOList = CreatePartInputIOList(part);
Grid gridOutputIOList = CreatePartOutputIOList(part);
Button buttonOn, buttonOff, buttonStop;
Grid gridButton = CreateOnOffStopButtonGrid(out buttonOn, out buttonOff, out buttonStop);
buttonOn.Content = onName;
buttonOff.Content = offName;
buttonStop.Content = "STOP";
buttonOn.Click +=
delegate(object sender, RoutedEventArgs e)
{
OnAction(sender);
};
buttonOff.Click +=
delegate(object sender, RoutedEventArgs e)
{
OffAction(sender);
};
buttonStop.Click +=
delegate(object sender, RoutedEventArgs e)
{
StopAction(sender);
};
TextBox textBoxRepeat = new TextBox();
textBoxRepeat.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
textBoxRepeat.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
textBoxRepeat.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
textBoxRepeat.VerticalContentAlignment = System.Windows.VerticalAlignment.Center;
textBoxRepeat.Height = Double.NaN;
textBoxRepeat.Width = Double.NaN;
textBoxRepeat.Margin = new Thickness(2);
bd = new Binding("RepeatTime");
bd.Source = obj;
bd.Mode = BindingMode.TwoWay;
textBoxRepeat.SetBinding(TextBox.TextProperty, bd);
CheckBox checkBoxRepeatUse = new CheckBox();
checkBoxRepeatUse.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
checkBoxRepeatUse.VerticalAlignment = System.Windows.VerticalAlignment.Center;
checkBoxRepeatUse.LayoutTransform = new ScaleTransform(CHECKBOX_SIZE, CHECKBOX_SIZE);
bd = new Binding("RepeatUse");
bd.Source = obj;
bd.Mode = BindingMode.TwoWay;
checkBoxRepeatUse.SetBinding(CheckBox.IsCheckedProperty, bd);
int rowCount = grid.RowDefinitions.Count - 1;
grid.Children.Add(labelName);
Grid.SetColumn(labelName, 0);
Grid.SetRow(labelName, rowCount);
grid.Children.Add(labelStatus);
Grid.SetColumn(labelStatus, 1);
Grid.SetRow(labelStatus, rowCount);
//.........这里部分代码省略.........
示例15: CreateOnOffStopOperationInfo
private void CreateOnOffStopOperationInfo(Grid grid, FALibrary.Part.FAPart part, string name, Action<object> OnAction, Action<object> OffAction, Action<object> StopAction, Func<bool> IsOn, Func<bool> IsOff, string onName, string offName)
{
GeneralOperationInfo obj = new GeneralOperationInfo();
RowDefinition rd = new RowDefinition();
rd.Height = new GridLength(150, GridUnitType.Auto);
rd.MinHeight = 100;
grid.RowDefinitions.Add(rd);
SetOperationGridColor(grid, grid.RowDefinitions.Count - 1);
obj.Name = name;
obj.On = OnAction;
obj.Off = OffAction;
obj.StatusOnName = onName;
obj.StatusOffName = offName;
obj.IsOn = IsOn;
obj.IsOff = IsOff;
Label labelName = new Label();
labelName.Height = Double.NaN;
labelName.Width = Double.NaN;
labelName.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
labelName.VerticalContentAlignment = System.Windows.VerticalAlignment.Center;
labelName.Margin = new Thickness(2);
Binding bd = new Binding("Name");
bd.Source = obj;
bd.Mode = BindingMode.OneWay;
TextBlock textBlockName = new TextBlock();
textBlockName.TextWrapping = TextWrapping.Wrap;
textBlockName.TextAlignment = TextAlignment.Center;
textBlockName.SetBinding(TextBlock.TextProperty, bd);
labelName.Content = textBlockName;
Label labelStatus = new Label();
labelStatus.Height = Double.NaN;
labelStatus.Width = Double.NaN;
labelStatus.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
labelStatus.VerticalContentAlignment = System.Windows.VerticalAlignment.Center;
labelStatus.Margin = new Thickness(2);
bd = new Binding("Status");
bd.Source = obj;
bd.Mode = BindingMode.OneWay;
TextBlock textBlockStatus = new TextBlock();
textBlockStatus.TextWrapping = TextWrapping.Wrap;
textBlockStatus.TextAlignment = TextAlignment.Center;
textBlockStatus.SetBinding(TextBlock.TextProperty, bd);
labelStatus.Content = textBlockStatus;
Grid gridInputIOList = CreatePartInputIOList(part);
Grid gridOutputIOList = CreatePartOutputIOList(part);
Button buttonOnOff = new Button();
buttonOnOff.Height = Double.NaN;
buttonOnOff.Width = Double.NaN;
buttonOnOff.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
buttonOnOff.VerticalContentAlignment = System.Windows.VerticalAlignment.Center;
buttonOnOff.Margin = new Thickness(2);
bd = new Binding("ButtonCaption");
bd.Source = obj;
bd.Mode = BindingMode.OneWay;
buttonOnOff.SetBinding(Button.ContentProperty, bd);
buttonOnOff.Click +=
delegate(object sender, RoutedEventArgs e)
{
if (obj.IsOn())
OffAction(sender);
else
{
if (obj.IsOff())
OnAction(sender);
else if (StopAction != null)
{
StopAction(sender);
}
else
OnAction(sender);
}
};
TextBox textBoxRepeat = new TextBox();
textBoxRepeat.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
textBoxRepeat.VerticalContentAlignment = System.Windows.VerticalAlignment.Center;
textBoxRepeat.Height = Double.NaN;
textBoxRepeat.Width = Double.NaN;
textBoxRepeat.Margin = new Thickness(2);
bd = new Binding("RepeatTime");
bd.Source = obj;
bd.Mode = BindingMode.TwoWay;
FAFramework.Utility.BindingUtility.SetBindingObject(textBoxRepeat, BindingMode.TwoWay, obj, TextBox.TextProperty, "RepeatTime");
CheckBox checkBoxRepeatUse = new CheckBox();
checkBoxRepeatUse.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
checkBoxRepeatUse.VerticalAlignment = System.Windows.VerticalAlignment.Center;
checkBoxRepeatUse.LayoutTransform = new ScaleTransform(CHECKBOX_SIZE, CHECKBOX_SIZE);
bd = new Binding("RepeatUse");
bd.Source = obj;
bd.Mode = BindingMode.TwoWay;
checkBoxRepeatUse.SetBinding(CheckBox.IsCheckedProperty, bd);
int rowCount = grid.RowDefinitions.Count - 1;
grid.Children.Add(labelName);
//.........这里部分代码省略.........